Skip to content

Commit

Permalink
Adds resulting generated examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
plaflamme committed Sep 10, 2020
1 parent 5339757 commit 498c5a4
Show file tree
Hide file tree
Showing 19 changed files with 2,068 additions and 0 deletions.
24 changes: 24 additions & 0 deletions examples/internal/clients/generateunboundmethods/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.8
121 changes: 121 additions & 0 deletions examples/internal/clients/generateunboundmethods/api/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
swagger: "2.0"
info:
description: "Unannotated Echo Service\nSimilar to echo_service.proto but without\
\ annotations and without external configuration.\n\nEcho Service API consists\
\ of a single service which returns\na message."
version: "version not set"
title: "examples/internal/proto/examplepb/generate_unbound_methods.proto"
consumes:
- "application/json"
produces:
- "application/json"
paths:
/grpc.gateway.examples.internal.examplepb.GenerateUnboundMethodsEchoService/Echo:
post:
tags:
- "GenerateUnboundMethodsEchoService"
summary: "Echo method receives a simple message and returns it."
description: "The message posted as the id parameter will also be\nreturned."
operationId: "GenerateUnboundMethodsEchoService_Echo"
parameters:
- in: "body"
name: "body"
required: true
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
x-exportParamName: "Body"
responses:
200:
description: "A successful response."
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
default:
description: "An unexpected error response"
schema:
$ref: "#/definitions/runtimeError"
/grpc.gateway.examples.internal.examplepb.GenerateUnboundMethodsEchoService/EchoBody:
post:
tags:
- "GenerateUnboundMethodsEchoService"
summary: "EchoBody method receives a simple message and returns it."
operationId: "GenerateUnboundMethodsEchoService_EchoBody"
parameters:
- in: "body"
name: "body"
required: true
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
x-exportParamName: "Body"
responses:
200:
description: "A successful response."
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
default:
description: "An unexpected error response"
schema:
$ref: "#/definitions/runtimeError"
/grpc.gateway.examples.internal.examplepb.GenerateUnboundMethodsEchoService/EchoDelete:
post:
tags:
- "GenerateUnboundMethodsEchoService"
summary: "EchoDelete method receives a simple message and returns it."
operationId: "GenerateUnboundMethodsEchoService_EchoDelete"
parameters:
- in: "body"
name: "body"
required: true
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
x-exportParamName: "Body"
responses:
200:
description: "A successful response."
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
default:
description: "An unexpected error response"
schema:
$ref: "#/definitions/runtimeError"
definitions:
examplepbGenerateUnboundMethodsSimpleMessage:
type: "object"
properties:
id:
type: "string"
description: "Id represents the message identifier."
num:
type: "string"
format: "int64"
duration:
type: "string"
description: "UnannotatedSimpleMessage represents a simple message sent to the\
\ unannotated Echo service."
example:
duration: "duration"
num: "num"
id: "id"
protobufAny:
type: "object"
properties:
type_url:
type: "string"
value:
type: "string"
format: "byte"
pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
runtimeError:
type: "object"
properties:
error:
type: "string"
code:
type: "integer"
format: "int32"
message:
type: "string"
details:
type: "array"
items:
$ref: "#/definitions/protobufAny"
Loading

0 comments on commit 498c5a4

Please sign in to comment.