regen with never protoc-gen-go

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-03-22 08:34:12 +03:00
parent 03efdb59f5
commit 9027d61c31
14 changed files with 16867 additions and 2845 deletions

View File

@ -14,14 +14,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc-gen-go v1.26.0-devel
// protoc v3.6.1
// source: api/annotations.proto
package api
import (
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@ -35,10 +34,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var file_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptor.MethodOptions)(nil),

View File

@ -14,14 +14,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc-gen-go v1.26.0-devel
// protoc v3.6.1
// source: api/field_behavior.proto
package api
import (
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@ -36,10 +35,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// An indicator of the behavior of a given field (for example, that a field
// is required in requests, or given as output but ignored as input).
// This **does not** change the behavior in protocol buffers itself; it only

View File

@ -14,14 +14,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc-gen-go v1.26.0-devel
// protoc v3.6.1
// source: api/http.proto
package api
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@ -35,10 +34,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// Defines the HTTP configuration for an API service. It contains a list of
// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
// to one or more HTTP REST API methods.

View File

@ -14,14 +14,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc-gen-go v1.26.0-devel
// protoc v3.6.1
// source: api/httpbody.proto
package api
import (
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@ -36,10 +35,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// Message that represents an arbitrary HTTP body. It should only be used for
// payload formats that can't be represented as JSON, such as raw binary or
// an HTML page.

View File

@ -14,14 +14,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc-gen-go v1.26.0-devel
// protoc v3.6.1
// source: api/micro.proto
package api
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@ -35,10 +34,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// Defines the Micro configuration for a method. It contains a
// [MicroMethod][micro.api.MicroMethod]
type MicroMethod struct {

View File

@ -9,4 +9,3 @@ package main
///go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/openapiv2.proto
//go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/gopenapiv2.proto
//go:generate protoc -I. -I./openapiv3 --go_out=paths=source_relative:. ./openapiv3/gopenapiv3.proto
//go:generate protoc -I. -I./proto --go_out=paths=source_relative:. ./proto/frame.proto

View File

@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc-gen-go v1.26.0-devel
// protoc v3.6.1
// source: openapiv2/annotations.proto
package openapiv2
import (
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@ -21,14 +20,10 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var file_openapiv2_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*Swagger)(nil),
ExtensionType: (*Document)(nil),
Field: 1042,
Name: "micro.openapiv2.openapiv2_swagger",
Tag: "bytes,1042,opt,name=openapiv2_swagger",
@ -60,7 +55,7 @@ var file_openapiv2_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
},
{
ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*JSONSchema)(nil),
ExtensionType: (*Schema)(nil),
Field: 1042,
Name: "micro.openapiv2.openapiv2_field",
Tag: "bytes,1042,opt,name=openapiv2_field",
@ -75,7 +70,7 @@ var (
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
//
// optional micro.openapiv2.Swagger openapiv2_swagger = 1042;
// optional micro.openapiv2.Document openapiv2_swagger = 1042;
E_Openapiv2Swagger = &file_openapiv2_annotations_proto_extTypes[0]
)
@ -119,7 +114,7 @@ var (
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
//
// optional micro.openapiv2.JSONSchema openapiv2_field = 1042;
// optional micro.openapiv2.Schema openapiv2_field = 1042;
E_Openapiv2Field = &file_openapiv2_annotations_proto_extTypes[4]
)
@ -131,44 +126,44 @@ var file_openapiv2_annotations_proto_rawDesc = []byte{
0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x1a, 0x20,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x19, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x64, 0x0a, 0x11, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72,
0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92,
0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52,
0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65,
0x72, 0x3a, 0x6c, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1a, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
0x64, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x63, 0x68,
0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x69,
0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x5b, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x76, 0x32, 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x54,
0x61, 0x67, 0x3a, 0x64, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x69,
0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x4a, 0x53,
0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d,
0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x1a, 0x1a, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x67, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x65, 0x0a, 0x11,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65,
0x72, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
0x74, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67,
0x67, 0x65, 0x72, 0x3a, 0x6c, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x3a, 0x64, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
0x32, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x5b, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x76, 0x32, 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
0x32, 0x54, 0x61, 0x67, 0x3a, 0x60, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72,
0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_openapiv2_annotations_proto_goTypes = []interface{}{
@ -177,11 +172,10 @@ var file_openapiv2_annotations_proto_goTypes = []interface{}{
(*descriptor.MessageOptions)(nil), // 2: google.protobuf.MessageOptions
(*descriptor.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions
(*descriptor.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
(*Swagger)(nil), // 5: micro.openapiv2.Swagger
(*Document)(nil), // 5: micro.openapiv2.Document
(*Operation)(nil), // 6: micro.openapiv2.Operation
(*Schema)(nil), // 7: micro.openapiv2.Schema
(*Tag)(nil), // 8: micro.openapiv2.Tag
(*JSONSchema)(nil), // 9: micro.openapiv2.JSONSchema
}
var file_openapiv2_annotations_proto_depIdxs = []int32{
0, // 0: micro.openapiv2.openapiv2_swagger:extendee -> google.protobuf.FileOptions
@ -189,11 +183,11 @@ var file_openapiv2_annotations_proto_depIdxs = []int32{
2, // 2: micro.openapiv2.openapiv2_schema:extendee -> google.protobuf.MessageOptions
3, // 3: micro.openapiv2.openapiv2_tag:extendee -> google.protobuf.ServiceOptions
4, // 4: micro.openapiv2.openapiv2_field:extendee -> google.protobuf.FieldOptions
5, // 5: micro.openapiv2.openapiv2_swagger:type_name -> micro.openapiv2.Swagger
5, // 5: micro.openapiv2.openapiv2_swagger:type_name -> micro.openapiv2.Document
6, // 6: micro.openapiv2.openapiv2_operation:type_name -> micro.openapiv2.Operation
7, // 7: micro.openapiv2.openapiv2_schema:type_name -> micro.openapiv2.Schema
8, // 8: micro.openapiv2.openapiv2_tag:type_name -> micro.openapiv2.Tag
9, // 9: micro.openapiv2.openapiv2_field:type_name -> micro.openapiv2.JSONSchema
7, // 9: micro.openapiv2.openapiv2_field:type_name -> micro.openapiv2.Schema
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
5, // [5:10] is the sub-list for extension type_name
@ -206,7 +200,7 @@ func file_openapiv2_annotations_proto_init() {
if File_openapiv2_annotations_proto != nil {
return
}
file_openapiv2_openapiv2_proto_init()
file_openapiv2_gopenapiv2_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -5,14 +5,14 @@ package micro.openapiv2;
option go_package = "github.com/unistack-org/micro-proto/openapiv2;openapiv2";
import "google/protobuf/descriptor.proto";
import "openapiv2/openapiv2.proto";
import "openapiv2/gopenapiv2.proto";
extend google.protobuf.FileOptions {
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Swagger openapiv2_swagger = 1042;
Document openapiv2_swagger = 1042;
}
extend google.protobuf.MethodOptions {
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
@ -40,5 +40,5 @@ extend google.protobuf.FieldOptions {
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
JSONSchema openapiv2_field = 1042;
Schema openapiv2_field = 1042;
}

7386
openapiv2/gopenapiv2.pb.go Normal file

File diff suppressed because it is too large Load Diff

665
openapiv2/gopenapiv2.proto Normal file
View File

@ -0,0 +1,665 @@
// Copyright 2020 Google LLC. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// THIS FILE IS AUTOMATICALLY GENERATED.
syntax = "proto3";
package micro.openapiv2;
import "google/protobuf/any.proto";
// This option lets the proto compiler generate Java code inside the package
// name (see below) instead of inside an outer class. It creates a simpler
// developer experience by reducing one-level of name nesting and be
// consistent with most programming languages that don't support outer classes.
option java_multiple_files = true;
// The Java outer classname should be the filename in UpperCamelCase. This
// class is only used to hold proto descriptor, so developers don't need to
// work with it directly.
option java_outer_classname = "OpenAPIProto";
// The Java package name must be proto package name with proper prefix.
option java_package = "micro.openapiv2";
// A reasonable prefix for the Objective-C symbols generated from the package.
// It should at a minimum be 3 characters long, all uppercase, and convention
// is to use an abbreviation of the package name. Something short, but
// hopefully unique enough to not conflict with things that may come along in
// the future. 'GPB' is reserved for the protocol buffer implementation itself.
option objc_class_prefix = "OAS";
// The Go package name.
option go_package = "github.com/unistack-org/micro-proto/openapiv2;openapiv2";
message AdditionalPropertiesItem {
oneof oneof {
Schema schema = 1;
bool boolean = 2;
}
}
message Any {
google.protobuf.Any value = 1;
string yaml = 2;
}
message ApiKeySecurity {
string type = 1;
string name = 2;
string in = 3;
string description = 4;
repeated NamedAny vendor_extension = 5;
}
message BasicAuthenticationSecurity {
string type = 1;
string description = 2;
repeated NamedAny vendor_extension = 3;
}
message BodyParameter {
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 1;
// The name of the parameter.
string name = 2;
// Determines the location of the parameter.
string in = 3;
// Determines whether or not this parameter is required or optional.
bool required = 4;
Schema schema = 5;
repeated NamedAny vendor_extension = 6;
}
// Contact information for the owners of the API.
message Contact {
// The identifying name of the contact person/organization.
string name = 1;
// The URL pointing to the contact information.
string url = 2;
// The email address of the contact person/organization.
string email = 3;
repeated NamedAny vendor_extension = 4;
}
message Default {
repeated NamedAny additional_properties = 1;
}
// One or more JSON objects describing the schemas being consumed and produced by the API.
message Definitions {
repeated NamedSchema additional_properties = 1;
}
message Document {
// The Swagger version of this document.
string swagger = 1;
Info info = 2;
// The host (name or ip) of the API. Example: 'swagger.io'
string host = 3;
// The base path to the API. Example: '/api'.
string base_path = 4;
// The transfer protocol of the API.
repeated string schemes = 5;
// A list of MIME types accepted by the API.
repeated string consumes = 6;
// A list of MIME types the API can produce.
repeated string produces = 7;
Paths paths = 8;
Definitions definitions = 9;
ParameterDefinitions parameters = 10;
ResponseDefinitions responses = 11;
repeated SecurityRequirement security = 12;
SecurityDefinitions security_definitions = 13;
repeated Tag tags = 14;
ExternalDocs external_docs = 15;
repeated NamedAny vendor_extension = 16;
}
message Examples {
repeated NamedAny additional_properties = 1;
}
// information about external documentation
message ExternalDocs {
string description = 1;
string url = 2;
repeated NamedAny vendor_extension = 3;
}
// A deterministic version of a JSON Schema object.
message FileSchema {
string format = 1;
string title = 2;
string description = 3;
Any default = 4;
repeated string required = 5;
string type = 6;
bool read_only = 7;
ExternalDocs external_docs = 8;
Any example = 9;
repeated NamedAny vendor_extension = 10;
}
message FormDataParameterSubSchema {
// Determines whether or not this parameter is required or optional.
bool required = 1;
// Determines the location of the parameter.
string in = 2;
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 3;
// The name of the parameter.
string name = 4;
// allows sending a parameter by name only or with an empty value.
bool allow_empty_value = 5;
string type = 6;
string format = 7;
PrimitivesItems items = 8;
string collection_format = 9;
Any default = 10;
double maximum = 11;
bool exclusive_maximum = 12;
double minimum = 13;
bool exclusive_minimum = 14;
int64 max_length = 15;
int64 min_length = 16;
string pattern = 17;
int64 max_items = 18;
int64 min_items = 19;
bool unique_items = 20;
repeated Any enum = 21;
double multiple_of = 22;
repeated NamedAny vendor_extension = 23;
}
message Header {
string type = 1;
string format = 2;
PrimitivesItems items = 3;
string collection_format = 4;
Any default = 5;
double maximum = 6;
bool exclusive_maximum = 7;
double minimum = 8;
bool exclusive_minimum = 9;
int64 max_length = 10;
int64 min_length = 11;
string pattern = 12;
int64 max_items = 13;
int64 min_items = 14;
bool unique_items = 15;
repeated Any enum = 16;
double multiple_of = 17;
string description = 18;
repeated NamedAny vendor_extension = 19;
}
message HeaderParameterSubSchema {
// Determines whether or not this parameter is required or optional.
bool required = 1;
// Determines the location of the parameter.
string in = 2;
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 3;
// The name of the parameter.
string name = 4;
string type = 5;
string format = 6;
PrimitivesItems items = 7;
string collection_format = 8;
Any default = 9;
double maximum = 10;
bool exclusive_maximum = 11;
double minimum = 12;
bool exclusive_minimum = 13;
int64 max_length = 14;
int64 min_length = 15;
string pattern = 16;
int64 max_items = 17;
int64 min_items = 18;
bool unique_items = 19;
repeated Any enum = 20;
double multiple_of = 21;
repeated NamedAny vendor_extension = 22;
}
message Headers {
repeated NamedHeader additional_properties = 1;
}
// General information about the API.
message Info {
// A unique and precise title of the API.
string title = 1;
// A semantic version number of the API.
string version = 2;
// A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed.
string description = 3;
// The terms of service for the API.
string terms_of_service = 4;
Contact contact = 5;
License license = 6;
repeated NamedAny vendor_extension = 7;
}
message ItemsItem {
repeated Schema schema = 1;
}
message JsonReference {
string _ref = 1;
string description = 2;
}
message License {
// The name of the license type. It's encouraged to use an OSI compatible license.
string name = 1;
// The URL pointing to the license.
string url = 2;
repeated NamedAny vendor_extension = 3;
}
// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
message NamedAny {
// Map key
string name = 1;
// Mapped value
Any value = 2;
}
// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs.
message NamedHeader {
// Map key
string name = 1;
// Mapped value
Header value = 2;
}
// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
message NamedParameter {
// Map key
string name = 1;
// Mapped value
Parameter value = 2;
}
// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
message NamedPathItem {
// Map key
string name = 1;
// Mapped value
PathItem value = 2;
}
// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs.
message NamedResponse {
// Map key
string name = 1;
// Mapped value
Response value = 2;
}
// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs.
message NamedResponseValue {
// Map key
string name = 1;
// Mapped value
ResponseValue value = 2;
}
// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
message NamedSchema {
// Map key
string name = 1;
// Mapped value
Schema value = 2;
}
// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs.
message NamedSecurityDefinitionsItem {
// Map key
string name = 1;
// Mapped value
SecurityDefinitionsItem value = 2;
}
// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
message NamedString {
// Map key
string name = 1;
// Mapped value
string value = 2;
}
// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
message NamedStringArray {
// Map key
string name = 1;
// Mapped value
StringArray value = 2;
}
message NonBodyParameter {
oneof oneof {
HeaderParameterSubSchema header_parameter_sub_schema = 1;
FormDataParameterSubSchema form_data_parameter_sub_schema = 2;
QueryParameterSubSchema query_parameter_sub_schema = 3;
PathParameterSubSchema path_parameter_sub_schema = 4;
}
}
message Oauth2AccessCodeSecurity {
string type = 1;
string flow = 2;
Oauth2Scopes scopes = 3;
string authorization_url = 4;
string token_url = 5;
string description = 6;
repeated NamedAny vendor_extension = 7;
}
message Oauth2ApplicationSecurity {
string type = 1;
string flow = 2;
Oauth2Scopes scopes = 3;
string token_url = 4;
string description = 5;
repeated NamedAny vendor_extension = 6;
}
message Oauth2ImplicitSecurity {
string type = 1;
string flow = 2;
Oauth2Scopes scopes = 3;
string authorization_url = 4;
string description = 5;
repeated NamedAny vendor_extension = 6;
}
message Oauth2PasswordSecurity {
string type = 1;
string flow = 2;
Oauth2Scopes scopes = 3;
string token_url = 4;
string description = 5;
repeated NamedAny vendor_extension = 6;
}
message Oauth2Scopes {
repeated NamedString additional_properties = 1;
}
message Operation {
repeated string tags = 1;
// A brief summary of the operation.
string summary = 2;
// A longer description of the operation, GitHub Flavored Markdown is allowed.
string description = 3;
ExternalDocs external_docs = 4;
// A unique identifier of the operation.
string operation_id = 5;
// A list of MIME types the API can produce.
repeated string produces = 6;
// A list of MIME types the API can consume.
repeated string consumes = 7;
// The parameters needed to send a valid API call.
repeated ParametersItem parameters = 8;
Responses responses = 9;
// The transfer protocol of the API.
repeated string schemes = 10;
bool deprecated = 11;
repeated SecurityRequirement security = 12;
repeated NamedAny vendor_extension = 13;
}
message Parameter {
oneof oneof {
BodyParameter body_parameter = 1;
NonBodyParameter non_body_parameter = 2;
}
}
// One or more JSON representations for parameters
message ParameterDefinitions {
repeated NamedParameter additional_properties = 1;
}
message ParametersItem {
oneof oneof {
Parameter parameter = 1;
JsonReference json_reference = 2;
}
}
message PathItem {
string _ref = 1;
Operation get = 2;
Operation put = 3;
Operation post = 4;
Operation delete = 5;
Operation options = 6;
Operation head = 7;
Operation patch = 8;
// The parameters needed to send a valid API call.
repeated ParametersItem parameters = 9;
repeated NamedAny vendor_extension = 10;
}
message PathParameterSubSchema {
// Determines whether or not this parameter is required or optional.
bool required = 1;
// Determines the location of the parameter.
string in = 2;
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 3;
// The name of the parameter.
string name = 4;
string type = 5;
string format = 6;
PrimitivesItems items = 7;
string collection_format = 8;
Any default = 9;
double maximum = 10;
bool exclusive_maximum = 11;
double minimum = 12;
bool exclusive_minimum = 13;
int64 max_length = 14;
int64 min_length = 15;
string pattern = 16;
int64 max_items = 17;
int64 min_items = 18;
bool unique_items = 19;
repeated Any enum = 20;
double multiple_of = 21;
repeated NamedAny vendor_extension = 22;
}
// Relative paths to the individual endpoints. They must be relative to the 'basePath'.
message Paths {
repeated NamedAny vendor_extension = 1;
repeated NamedPathItem path = 2;
}
message PrimitivesItems {
string type = 1;
string format = 2;
PrimitivesItems items = 3;
string collection_format = 4;
Any default = 5;
double maximum = 6;
bool exclusive_maximum = 7;
double minimum = 8;
bool exclusive_minimum = 9;
int64 max_length = 10;
int64 min_length = 11;
string pattern = 12;
int64 max_items = 13;
int64 min_items = 14;
bool unique_items = 15;
repeated Any enum = 16;
double multiple_of = 17;
repeated NamedAny vendor_extension = 18;
}
message Properties {
repeated NamedSchema additional_properties = 1;
}
message QueryParameterSubSchema {
// Determines whether or not this parameter is required or optional.
bool required = 1;
// Determines the location of the parameter.
string in = 2;
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 3;
// The name of the parameter.
string name = 4;
// allows sending a parameter by name only or with an empty value.
bool allow_empty_value = 5;
string type = 6;
string format = 7;
PrimitivesItems items = 8;
string collection_format = 9;
Any default = 10;
double maximum = 11;
bool exclusive_maximum = 12;
double minimum = 13;
bool exclusive_minimum = 14;
int64 max_length = 15;
int64 min_length = 16;
string pattern = 17;
int64 max_items = 18;
int64 min_items = 19;
bool unique_items = 20;
repeated Any enum = 21;
double multiple_of = 22;
repeated NamedAny vendor_extension = 23;
}
message Response {
string description = 1;
SchemaItem schema = 2;
Headers headers = 3;
Examples examples = 4;
repeated NamedAny vendor_extension = 5;
}
// One or more JSON representations for responses
message ResponseDefinitions {
repeated NamedResponse additional_properties = 1;
}
message ResponseValue {
oneof oneof {
Response response = 1;
JsonReference json_reference = 2;
}
}
// Response objects names can either be any valid HTTP status code or 'default'.
message Responses {
repeated NamedResponseValue response_code = 1;
repeated NamedAny vendor_extension = 2;
}
// A deterministic version of a JSON Schema object.
message Schema {
string _ref = 1;
string format = 2;
string title = 3;
string description = 4;
Any default = 5;
double multiple_of = 6;
double maximum = 7;
bool exclusive_maximum = 8;
double minimum = 9;
bool exclusive_minimum = 10;
int64 max_length = 11;
int64 min_length = 12;
string pattern = 13;
int64 max_items = 14;
int64 min_items = 15;
bool unique_items = 16;
int64 max_properties = 17;
int64 min_properties = 18;
repeated string required = 19;
repeated Any enum = 20;
AdditionalPropertiesItem additional_properties = 21;
TypeItem type = 22;
ItemsItem items = 23;
repeated Schema all_of = 24;
Properties properties = 25;
string discriminator = 26;
bool read_only = 27;
Xml xml = 28;
ExternalDocs external_docs = 29;
Any example = 30;
repeated NamedAny vendor_extension = 31;
}
message SchemaItem {
oneof oneof {
Schema schema = 1;
FileSchema file_schema = 2;
}
}
message SecurityDefinitions {
repeated NamedSecurityDefinitionsItem additional_properties = 1;
}
message SecurityDefinitionsItem {
oneof oneof {
BasicAuthenticationSecurity basic_authentication_security = 1;
ApiKeySecurity api_key_security = 2;
Oauth2ImplicitSecurity oauth2_implicit_security = 3;
Oauth2PasswordSecurity oauth2_password_security = 4;
Oauth2ApplicationSecurity oauth2_application_security = 5;
Oauth2AccessCodeSecurity oauth2_access_code_security = 6;
}
}
message SecurityRequirement {
repeated NamedStringArray additional_properties = 1;
}
message StringArray {
repeated string value = 1;
}
message Tag {
string name = 1;
string description = 2;
ExternalDocs external_docs = 3;
repeated NamedAny vendor_extension = 4;
}
message TypeItem {
repeated string value = 1;
}
// Any property starting with x- is valid.
message VendorExtension {
repeated NamedAny additional_properties = 1;
}
message Xml {
string name = 1;
string namespace = 2;
string prefix = 3;
bool attribute = 4;
bool wrapped = 5;
repeated NamedAny vendor_extension = 6;
}

File diff suppressed because it is too large Load Diff

View File

@ -97,7 +97,7 @@ message Swagger {
// service objects into OpenAPI v2 Tag objects.
reserved 13;
// Additional external documentation.
ExternalDocumentation external_docs = 14;
ExternalDocs external_docs = 14;
map<string, google.protobuf.Value> extensions = 15;
}
@ -137,7 +137,7 @@ message Operation {
// rich text representation.
string description = 3;
// Additional external documentation for this operation.
ExternalDocumentation external_docs = 4;
ExternalDocs external_docs = 4;
// Unique string used to identify the operation. The id MUST be unique among
// all operations described in the API. Tools and libraries MAY use the
// operationId to uniquely identify an operation, therefore, it is recommended
@ -299,16 +299,6 @@ message Info {
// ...
// };
//
message Contact {
// The identifying name of the contact person/organization.
string name = 1;
// The URL pointing to the contact information. MUST be in the format of a
// URL.
string url = 2;
// The email address of the contact person/organization. MUST be in the format
// of an email address.
string email = 3;
}
// `License` is a representation of OpenAPI v2 specification's License object.
//
@ -328,15 +318,8 @@ message Contact {
// ...
// };
//
message License {
// The license name used for the API.
string name = 1;
// A URL to the license used for the API. MUST be in the format of a URL.
string url = 2;
}
// `ExternalDocumentation` is a representation of OpenAPI v2 specification's
// ExternalDocumentation object.
// ExternalDocs object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
//
@ -351,14 +334,6 @@ message License {
// ...
// };
//
message ExternalDocumentation {
// A short description of the target documentation. GFM syntax can be used for
// rich text representation.
string description = 1;
// The URL for the target documentation. Value MUST be in the format
// of a URL.
string url = 2;
}
// `Schema` is a representation of OpenAPI v2 specification's Schema object.
//
@ -381,7 +356,7 @@ message Schema {
// field 4 is reserved for 'xml'.
reserved 4;
// Additional external documentation for this schema.
ExternalDocumentation external_docs = 5;
ExternalDocs external_docs = 5;
// A free-form property to include an example of an instance for this schema in JSON.
// This is copied verbatim to the output.
string example = 6;
@ -525,7 +500,7 @@ message Tag {
// representation.
string description = 2;
// Additional external documentation for this tag.
ExternalDocumentation external_docs = 3;
ExternalDocs external_docs = 3;
}
// `SecurityDefinitions` is a representation of OpenAPI v2 specification's

8087
openapiv3/gopenapiv3.pb.go Normal file

File diff suppressed because it is too large Load Diff

669
openapiv3/gopenapiv3.proto Normal file
View File

@ -0,0 +1,669 @@
// Copyright 2020 Google LLC. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// THIS FILE IS AUTOMATICALLY GENERATED.
syntax = "proto3";
package micro.openapiv3;
import "google/protobuf/any.proto";
// This option lets the proto compiler generate Java code inside the package
// name (see below) instead of inside an outer class. It creates a simpler
// developer experience by reducing one-level of name nesting and be
// consistent with most programming languages that don't support outer classes.
option java_multiple_files = true;
// The Java outer classname should be the filename in UpperCamelCase. This
// class is only used to hold proto descriptor, so developers don't need to
// work with it directly.
option java_outer_classname = "OpenAPIProto";
// The Java package name must be proto package name with proper prefix.
option java_package = "micro.openapiv3";
// A reasonable prefix for the Objective-C symbols generated from the package.
// It should at a minimum be 3 characters long, all uppercase, and convention
// is to use an abbreviation of the package name. Something short, but
// hopefully unique enough to not conflict with things that may come along in
// the future. 'GPB' is reserved for the protocol buffer implementation itself.
option objc_class_prefix = "OAS";
// The Go package name.
option go_package = "github.com/unistack-org/micro-proto/openapiv3;openapiv3";
message AdditionalPropertiesItem {
oneof oneof {
SchemaOrReference schema_or_reference = 1;
bool boolean = 2;
}
}
message Any {
google.protobuf.Any value = 1;
string yaml = 2;
}
message AnyOrExpression {
oneof oneof {
Any any = 1;
Expression expression = 2;
}
}
// A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
message Callback {
repeated NamedPathItem path = 1;
repeated NamedAny specification_extension = 2;
}
message CallbackOrReference {
oneof oneof {
Callback callback = 1;
Reference reference = 2;
}
}
message CallbacksOrReferences {
repeated NamedCallbackOrReference additional_properties = 1;
}
// Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
message Components {
SchemasOrReferences schemas = 1;
ResponsesOrReferences responses = 2;
ParametersOrReferences parameters = 3;
ExamplesOrReferences examples = 4;
RequestBodiesOrReferences request_bodies = 5;
HeadersOrReferences headers = 6;
SecuritySchemesOrReferences security_schemes = 7;
LinksOrReferences links = 8;
CallbacksOrReferences callbacks = 9;
repeated NamedAny specification_extension = 10;
}
// Contact information for the exposed API.
message Contact {
string name = 1;
string url = 2;
string email = 3;
repeated NamedAny specification_extension = 4;
}
message DefaultType {
oneof oneof {
double number = 1;
bool boolean = 2;
string string = 3;
}
}
// When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered.
message Discriminator {
string property_name = 1;
Strings mapping = 2;
repeated NamedAny specification_extension = 3;
}
message Document {
string openapi = 1;
Info info = 2;
repeated Server servers = 3;
Paths paths = 4;
Components components = 5;
repeated SecurityRequirement security = 6;
repeated Tag tags = 7;
ExternalDocs external_docs = 8;
repeated NamedAny specification_extension = 9;
}
// A single encoding definition applied to a single schema property.
message Encoding {
string content_type = 1;
HeadersOrReferences headers = 2;
string style = 3;
bool explode = 4;
bool allow_reserved = 5;
repeated NamedAny specification_extension = 6;
}
message Encodings {
repeated NamedEncoding additional_properties = 1;
}
message Example {
string summary = 1;
string description = 2;
Any value = 3;
string external_value = 4;
repeated NamedAny specification_extension = 5;
}
message ExampleOrReference {
oneof oneof {
Example example = 1;
Reference reference = 2;
}
}
message ExamplesOrReferences {
repeated NamedExampleOrReference additional_properties = 1;
}
message Expression {
repeated NamedAny additional_properties = 1;
}
// Allows referencing an external resource for extended documentation.
message ExternalDocs {
string description = 1;
string url = 2;
repeated NamedAny specification_extension = 3;
}
// The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`).
message Header {
string description = 1;
bool required = 2;
bool deprecated = 3;
bool allow_empty_value = 4;
string style = 5;
bool explode = 6;
bool allow_reserved = 7;
SchemaOrReference schema = 8;
Any example = 9;
ExamplesOrReferences examples = 10;
MediaTypes content = 11;
repeated NamedAny specification_extension = 12;
}
message HeaderOrReference {
oneof oneof {
Header header = 1;
Reference reference = 2;
}
}
message HeadersOrReferences {
repeated NamedHeaderOrReference additional_properties = 1;
}
// The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
message Info {
string title = 1;
string description = 2;
string terms_of_service = 3;
Contact contact = 4;
License license = 5;
string version = 6;
repeated NamedAny specification_extension = 7;
string summary = 8;
}
message ItemsItem {
repeated SchemaOrReference schema_or_reference = 1;
}
// License information for the exposed API.
message License {
string name = 1;
string url = 2;
repeated NamedAny specification_extension = 3;
}
// The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.
message Link {
string operation_ref = 1;
string operation_id = 2;
AnyOrExpression parameters = 3;
AnyOrExpression request_body = 4;
string description = 5;
Server server = 6;
repeated NamedAny specification_extension = 7;
}
message LinkOrReference {
oneof oneof {
Link link = 1;
Reference reference = 2;
}
}
message LinksOrReferences {
repeated NamedLinkOrReference additional_properties = 1;
}
// Each Media Type Object provides schema and examples for the media type identified by its key.
message MediaType {
SchemaOrReference schema = 1;
Any example = 2;
ExamplesOrReferences examples = 3;
Encodings encoding = 4;
repeated NamedAny specification_extension = 5;
}
message MediaTypes {
repeated NamedMediaType additional_properties = 1;
}
// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
message NamedAny {
// Map key
string name = 1;
// Mapped value
Any value = 2;
}
// Automatically-generated message used to represent maps of CallbackOrReference as ordered (name,value) pairs.
message NamedCallbackOrReference {
// Map key
string name = 1;
// Mapped value
CallbackOrReference value = 2;
}
// Automatically-generated message used to represent maps of Encoding as ordered (name,value) pairs.
message NamedEncoding {
// Map key
string name = 1;
// Mapped value
Encoding value = 2;
}
// Automatically-generated message used to represent maps of ExampleOrReference as ordered (name,value) pairs.
message NamedExampleOrReference {
// Map key
string name = 1;
// Mapped value
ExampleOrReference value = 2;
}
// Automatically-generated message used to represent maps of HeaderOrReference as ordered (name,value) pairs.
message NamedHeaderOrReference {
// Map key
string name = 1;
// Mapped value
HeaderOrReference value = 2;
}
// Automatically-generated message used to represent maps of LinkOrReference as ordered (name,value) pairs.
message NamedLinkOrReference {
// Map key
string name = 1;
// Mapped value
LinkOrReference value = 2;
}
// Automatically-generated message used to represent maps of MediaType as ordered (name,value) pairs.
message NamedMediaType {
// Map key
string name = 1;
// Mapped value
MediaType value = 2;
}
// Automatically-generated message used to represent maps of ParameterOrReference as ordered (name,value) pairs.
message NamedParameterOrReference {
// Map key
string name = 1;
// Mapped value
ParameterOrReference value = 2;
}
// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
message NamedPathItem {
// Map key
string name = 1;
// Mapped value
PathItem value = 2;
}
// Automatically-generated message used to represent maps of RequestBodyOrReference as ordered (name,value) pairs.
message NamedRequestBodyOrReference {
// Map key
string name = 1;
// Mapped value
RequestBodyOrReference value = 2;
}
// Automatically-generated message used to represent maps of ResponseOrReference as ordered (name,value) pairs.
message NamedResponseOrReference {
// Map key
string name = 1;
// Mapped value
ResponseOrReference value = 2;
}
// Automatically-generated message used to represent maps of SchemaOrReference as ordered (name,value) pairs.
message NamedSchemaOrReference {
// Map key
string name = 1;
// Mapped value
SchemaOrReference value = 2;
}
// Automatically-generated message used to represent maps of SecuritySchemeOrReference as ordered (name,value) pairs.
message NamedSecuritySchemeOrReference {
// Map key
string name = 1;
// Mapped value
SecuritySchemeOrReference value = 2;
}
// Automatically-generated message used to represent maps of ServerVariable as ordered (name,value) pairs.
message NamedServerVariable {
// Map key
string name = 1;
// Mapped value
ServerVariable value = 2;
}
// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
message NamedString {
// Map key
string name = 1;
// Mapped value
string value = 2;
}
// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
message NamedStringArray {
// Map key
string name = 1;
// Mapped value
StringArray value = 2;
}
// Configuration details for a supported OAuth Flow
message OauthFlow {
string authorization_url = 1;
string token_url = 2;
string refresh_url = 3;
Strings scopes = 4;
repeated NamedAny specification_extension = 5;
}
// Allows configuration of the supported OAuth Flows.
message OauthFlows {
OauthFlow implicit = 1;
OauthFlow password = 2;
OauthFlow client_credentials = 3;
OauthFlow authorization_code = 4;
repeated NamedAny specification_extension = 5;
}
message Object {
repeated NamedAny additional_properties = 1;
}
// Describes a single API operation on a path.
message Operation {
repeated string tags = 1;
string summary = 2;
string description = 3;
ExternalDocs external_docs = 4;
string operation_id = 5;
repeated ParameterOrReference parameters = 6;
RequestBodyOrReference request_body = 7;
Responses responses = 8;
CallbacksOrReferences callbacks = 9;
bool deprecated = 10;
repeated SecurityRequirement security = 11;
repeated Server servers = 12;
repeated NamedAny specification_extension = 13;
}
// Describes a single operation parameter. A unique parameter is defined by a combination of a name and location.
message Parameter {
string name = 1;
string in = 2;
string description = 3;
bool required = 4;
bool deprecated = 5;
bool allow_empty_value = 6;
string style = 7;
bool explode = 8;
bool allow_reserved = 9;
SchemaOrReference schema = 10;
Any example = 11;
ExamplesOrReferences examples = 12;
MediaTypes content = 13;
repeated NamedAny specification_extension = 14;
}
message ParameterOrReference {
oneof oneof {
Parameter parameter = 1;
Reference reference = 2;
}
}
message ParametersOrReferences {
repeated NamedParameterOrReference additional_properties = 1;
}
// Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
message PathItem {
string _ref = 1;
string summary = 2;
string description = 3;
Operation get = 4;
Operation put = 5;
Operation post = 6;
Operation delete = 7;
Operation options = 8;
Operation head = 9;
Operation patch = 10;
Operation trace = 11;
repeated Server servers = 12;
repeated ParameterOrReference parameters = 13;
repeated NamedAny specification_extension = 14;
}
// Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.
message Paths {
repeated NamedPathItem path = 1;
repeated NamedAny specification_extension = 2;
}
message Properties {
repeated NamedSchemaOrReference additional_properties = 1;
}
// A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.
message Reference {
string _ref = 1;
}
message RequestBodiesOrReferences {
repeated NamedRequestBodyOrReference additional_properties = 1;
}
// Describes a single request body.
message RequestBody {
string description = 1;
MediaTypes content = 2;
bool required = 3;
repeated NamedAny specification_extension = 4;
}
message RequestBodyOrReference {
oneof oneof {
RequestBody request_body = 1;
Reference reference = 2;
}
}
// Describes a single response from an API Operation, including design-time, static `links` to operations based on the response.
message Response {
string description = 1;
HeadersOrReferences headers = 2;
MediaTypes content = 3;
LinksOrReferences links = 4;
repeated NamedAny specification_extension = 5;
}
message ResponseOrReference {
oneof oneof {
Response response = 1;
Reference reference = 2;
}
}
// A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call.
message Responses {
ResponseOrReference default = 1;
repeated NamedResponseOrReference response_or_reference = 2;
repeated NamedAny specification_extension = 3;
}
message ResponsesOrReferences {
repeated NamedResponseOrReference additional_properties = 1;
}
// The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.
message Schema {
bool nullable = 1;
Discriminator discriminator = 2;
bool read_only = 3;
bool write_only = 4;
Xml xml = 5;
ExternalDocs external_docs = 6;
Any example = 7;
bool deprecated = 8;
string title = 9;
double multiple_of = 10;
double maximum = 11;
bool exclusive_maximum = 12;
double minimum = 13;
bool exclusive_minimum = 14;
int64 max_length = 15;
int64 min_length = 16;
string pattern = 17;
int64 max_items = 18;
int64 min_items = 19;
bool unique_items = 20;
int64 max_properties = 21;
int64 min_properties = 22;
repeated string required = 23;
repeated Any enum = 24;
string type = 25;
repeated SchemaOrReference all_of = 26;
repeated SchemaOrReference one_of = 27;
repeated SchemaOrReference any_of = 28;
Schema not = 29;
ItemsItem items = 30;
Properties properties = 31;
AdditionalPropertiesItem additional_properties = 32;
DefaultType default = 33;
string description = 34;
string format = 35;
repeated NamedAny specification_extension = 36;
}
message SchemaOrReference {
oneof oneof {
Schema schema = 1;
Reference reference = 2;
}
}
message SchemasOrReferences {
repeated NamedSchemaOrReference additional_properties = 1;
}
// Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.
message SecurityRequirement {
repeated NamedStringArray additional_properties = 1;
}
// Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect. Please note that currently (2019) the implicit flow is about to be deprecated OAuth 2.0 Security Best Current Practice. Recommended for most use case is Authorization Code Grant flow with PKCE.
message SecurityScheme {
string type = 1;
string description = 2;
string name = 3;
string in = 4;
string scheme = 5;
string bearer_format = 6;
OauthFlows flows = 7;
string open_id_connect_url = 8;
repeated NamedAny specification_extension = 9;
}
message SecuritySchemeOrReference {
oneof oneof {
SecurityScheme security_scheme = 1;
Reference reference = 2;
}
}
message SecuritySchemesOrReferences {
repeated NamedSecuritySchemeOrReference additional_properties = 1;
}
// An object representing a Server.
message Server {
string url = 1;
string description = 2;
ServerVariables variables = 3;
repeated NamedAny specification_extension = 4;
}
// An object representing a Server Variable for server URL template substitution.
message ServerVariable {
repeated string enum = 1;
string default = 2;
string description = 3;
repeated NamedAny specification_extension = 4;
}
message ServerVariables {
repeated NamedServerVariable additional_properties = 1;
}
// Any property starting with x- is valid.
message SpecificationExtension {
oneof oneof {
double number = 1;
bool boolean = 2;
string string = 3;
}
}
message StringArray {
repeated string value = 1;
}
message Strings {
repeated NamedString additional_properties = 1;
}
// Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
message Tag {
string name = 1;
string description = 2;
ExternalDocs external_docs = 3;
repeated NamedAny specification_extension = 4;
}
// A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior.
message Xml {
string name = 1;
string namespace = 2;
string prefix = 3;
bool attribute = 4;
bool wrapped = 5;
repeated NamedAny specification_extension = 6;
}