-
- All Implemented Interfaces:
-
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchemaOrBuilder,java.io.Serializable
public final class Openapiv2.JSONSchema extends GeneratedMessageV3 implements Openapiv2.JSONSchemaOrBuilder
Protobuf type`JSONSchema` represents properties from JSON Schema taken, and as used, in the OpenAPI v2 spec. This includes changes made by OpenAPI v2. See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject See also: https://cswr.github.io/JsonSchema/spec/basic_types/, https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json Example: message SimpleMessage { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { json_schema: { title: "SimpleMessage" description: "A simple message." required: ["id"] } }; // Id represents the message identifier. string id = 1; [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "The unique identifier of the simple message." }]; }grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumOpenapiv2.JSONSchema.JSONSchemaSimpleTypesProtobuf enum
grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypespublic interfaceOpenapiv2.JSONSchema.FieldConfigurationOrBuilderpublic final classOpenapiv2.JSONSchema.FieldConfiguration
Protobuf type'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. These properties are not defined by OpenAPIv2, but they are used to control the generation.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationpublic final classOpenapiv2.JSONSchema.Builder
Protobuf type`JSONSchema` represents properties from JSON Schema taken, and as used, in the OpenAPI v2 spec. This includes changes made by OpenAPI v2. See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject See also: https://cswr.github.io/JsonSchema/spec/basic_types/, https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json Example: message SimpleMessage { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { json_schema: { title: "SimpleMessage" description: "A simple message." required: ["id"] } }; // Id represents the message identifier. string id = 1; [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "The unique identifier of the simple message." }]; }grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
-
Field Summary
Fields Modifier and Type Field Description public final static intREF_FIELD_NUMBERpublic final static intTITLE_FIELD_NUMBERpublic final static intDESCRIPTION_FIELD_NUMBERpublic final static intDEFAULT_FIELD_NUMBERpublic final static intREAD_ONLY_FIELD_NUMBERpublic final static intEXAMPLE_FIELD_NUMBERpublic final static intMULTIPLE_OF_FIELD_NUMBERpublic final static intMAXIMUM_FIELD_NUMBERpublic final static intEXCLUSIVE_MAXIMUM_FIELD_NUMBERpublic final static intMINIMUM_FIELD_NUMBERpublic final static intEXCLUSIVE_MINIMUM_FIELD_NUMBERpublic final static intMAX_LENGTH_FIELD_NUMBERpublic final static intMIN_LENGTH_FIELD_NUMBERpublic final static intPATTERN_FIELD_NUMBERpublic final static intMAX_ITEMS_FIELD_NUMBERpublic final static intMIN_ITEMS_FIELD_NUMBERpublic final static intUNIQUE_ITEMS_FIELD_NUMBERpublic final static intMAX_PROPERTIES_FIELD_NUMBERpublic final static intMIN_PROPERTIES_FIELD_NUMBERpublic final static intREQUIRED_FIELD_NUMBERpublic final static intARRAY_FIELD_NUMBERpublic final static intTYPE_FIELD_NUMBERpublic final static intFORMAT_FIELD_NUMBERpublic final static intENUM_FIELD_NUMBERpublic final static intFIELD_CONFIGURATION_FIELD_NUMBERpublic final static intEXTENSIONS_FIELD_NUMBER
-
Method Summary
Modifier and Type Method Description final UnknownFieldSetgetUnknownFields()final static Descriptors.DescriptorgetDescriptor()StringgetRef()Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.string ref = 3;ByteStringgetRefBytes()Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.string ref = 3;StringgetTitle()The title of the schema.string title = 5;ByteStringgetTitleBytes()The title of the schema.string title = 5;StringgetDescription()A short description of the schema.string description = 6;ByteStringgetDescriptionBytes()A short description of the schema.string description = 6;StringgetDefault()string default = 7;ByteStringgetDefaultBytes()string default = 7;booleangetReadOnly()bool read_only = 8;StringgetExample()A free-form property to include a JSON example of this field. This is copied verbatim to the output swagger.json. Quotes must be escaped. This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObjectstring example = 9;ByteStringgetExampleBytes()A free-form property to include a JSON example of this field. This is copied verbatim to the output swagger.json. Quotes must be escaped. This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObjectstring example = 9;doublegetMultipleOf()double multiple_of = 10;doublegetMaximum()Maximum represents an inclusive upper limit for a numeric instance. The value of MUST be a number,double maximum = 11;booleangetExclusiveMaximum()bool exclusive_maximum = 12;doublegetMinimum()minimum represents an inclusive lower limit for a numeric instance. The value of MUST be a number,double minimum = 13;booleangetExclusiveMinimum()bool exclusive_minimum = 14;longgetMaxLength()uint64 max_length = 15;longgetMinLength()uint64 min_length = 16;StringgetPattern()string pattern = 17;ByteStringgetPatternBytes()string pattern = 17;longgetMaxItems()uint64 max_items = 20;longgetMinItems()uint64 min_items = 21;booleangetUniqueItems()bool unique_items = 22;longgetMaxProperties()uint64 max_properties = 24;longgetMinProperties()uint64 min_properties = 25;ProtocolStringListgetRequiredList()repeated string required = 26;intgetRequiredCount()repeated string required = 26;StringgetRequired(int index)repeated string required = 26;ByteStringgetRequiredBytes(int index)repeated string required = 26;ProtocolStringListgetArrayList()Items in 'array' must be unique.repeated string array = 34;intgetArrayCount()Items in 'array' must be unique.repeated string array = 34;StringgetArray(int index)Items in 'array' must be unique.repeated string array = 34;ByteStringgetArrayBytes(int index)Items in 'array' must be unique.repeated string array = 34;List<Openapiv2.JSONSchema.JSONSchemaSimpleTypes>getTypeList()repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;intgetTypeCount()repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;Openapiv2.JSONSchema.JSONSchemaSimpleTypesgetType(int index)repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;List<Integer>getTypeValueList()repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;intgetTypeValue(int index)repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;StringgetFormat()`Format`string format = 36;ByteStringgetFormatBytes()`Format`string format = 36;ProtocolStringListgetEnumList()Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1repeated string enum = 46;intgetEnumCount()Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1repeated string enum = 46;StringgetEnum(int index)Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1repeated string enum = 46;ByteStringgetEnumBytes(int index)Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1repeated string enum = 46;booleanhasFieldConfiguration()Additional field level properties used when generating the OpenAPI v2 file..grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001;Openapiv2.JSONSchema.FieldConfigurationgetFieldConfiguration()Additional field level properties used when generating the OpenAPI v2 file..grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001;Openapiv2.JSONSchema.FieldConfigurationOrBuildergetFieldConfigurationOrBuilder()Additional field level properties used when generating the OpenAPI v2 file..grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001;intgetExtensionsCount()map<string, .google.protobuf.Value> extensions = 48;booleancontainsExtensions(String key)map<string, .google.protobuf.Value> extensions = 48;Map<String, Value>getExtensions()Use getExtensionsMap instead. Map<String, Value>getExtensionsMap()map<string, .google.protobuf.Value> extensions = 48;ValuegetExtensionsOrDefault(String key, Value defaultValue)map<string, .google.protobuf.Value> extensions = 48;ValuegetExtensionsOrThrow(String key)map<string, .google.protobuf.Value> extensions = 48;final booleanisInitialized()voidwriteTo(CodedOutputStream output)intgetSerializedSize()booleanequals(Object obj)inthashCode()static Openapiv2.JSONSchemaparseFrom(ByteBuffer data)static Openapiv2.JSONSchemaparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)static Openapiv2.JSONSchemaparseFrom(ByteString data)static Openapiv2.JSONSchemaparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)static Openapiv2.JSONSchemaparseFrom(Array<byte> data)static Openapiv2.JSONSchemaparseFrom(Array<byte> data, ExtensionRegistryLite extensionRegistry)static Openapiv2.JSONSchemaparseFrom(InputStream input)static Openapiv2.JSONSchemaparseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)static Openapiv2.JSONSchemaparseDelimitedFrom(InputStream input)static Openapiv2.JSONSchemaparseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)static Openapiv2.JSONSchemaparseFrom(CodedInputStream input)static Openapiv2.JSONSchemaparseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)Openapiv2.JSONSchema.BuildernewBuilderForType()static Openapiv2.JSONSchema.BuildernewBuilder()static Openapiv2.JSONSchema.BuildernewBuilder(Openapiv2.JSONSchema prototype)Openapiv2.JSONSchema.BuildertoBuilder()static Openapiv2.JSONSchemagetDefaultInstance()static Parser<Openapiv2.JSONSchema>parser()Parser<Openapiv2.JSONSchema>getParserForType()Openapiv2.JSONSchemagetDefaultInstanceForType()-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof -
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, toString -
Methods inherited from class com.google.protobuf.AbstractMessageLite
toByteArray, toByteString, writeDelimitedTo -
Methods inherited from class com.google.protobuf.Message
getParserForType -
Methods inherited from class com.google.protobuf.MessageLite
getParserForType -
Methods inherited from class com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getUnknownFields
final UnknownFieldSet getUnknownFields()
-
getDescriptor
final static Descriptors.Descriptor getDescriptor()
-
getRef
String getRef()
Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.string ref = 3;
-
getRefBytes
ByteString getRefBytes()
Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.string ref = 3;
-
getTitle
String getTitle()
The title of the schema.string title = 5;
-
getTitleBytes
ByteString getTitleBytes()
The title of the schema.string title = 5;
-
getDescription
String getDescription()
A short description of the schema.string description = 6;
-
getDescriptionBytes
ByteString getDescriptionBytes()
A short description of the schema.string description = 6;
-
getDefault
String getDefault()
string default = 7;
-
getDefaultBytes
ByteString getDefaultBytes()
string default = 7;
-
getReadOnly
boolean getReadOnly()
bool read_only = 8;
-
getExample
String getExample()
A free-form property to include a JSON example of this field. This is copied verbatim to the output swagger.json. Quotes must be escaped. This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObjectstring example = 9;
-
getExampleBytes
ByteString getExampleBytes()
A free-form property to include a JSON example of this field. This is copied verbatim to the output swagger.json. Quotes must be escaped. This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObjectstring example = 9;
-
getMultipleOf
double getMultipleOf()
double multiple_of = 10;
-
getMaximum
double getMaximum()
Maximum represents an inclusive upper limit for a numeric instance. The value of MUST be a number,double maximum = 11;
-
getExclusiveMaximum
boolean getExclusiveMaximum()
bool exclusive_maximum = 12;
-
getMinimum
double getMinimum()
minimum represents an inclusive lower limit for a numeric instance. The value of MUST be a number,double minimum = 13;
-
getExclusiveMinimum
boolean getExclusiveMinimum()
bool exclusive_minimum = 14;
-
getMaxLength
long getMaxLength()
uint64 max_length = 15;
-
getMinLength
long getMinLength()
uint64 min_length = 16;
-
getPattern
String getPattern()
string pattern = 17;
-
getPatternBytes
ByteString getPatternBytes()
string pattern = 17;
-
getMaxItems
long getMaxItems()
uint64 max_items = 20;
-
getMinItems
long getMinItems()
uint64 min_items = 21;
-
getUniqueItems
boolean getUniqueItems()
bool unique_items = 22;
-
getMaxProperties
long getMaxProperties()
uint64 max_properties = 24;
-
getMinProperties
long getMinProperties()
uint64 min_properties = 25;
-
getRequiredList
ProtocolStringList getRequiredList()
repeated string required = 26;
-
getRequiredCount
int getRequiredCount()
repeated string required = 26;
-
getRequired
String getRequired(int index)
repeated string required = 26;- Parameters:
index- The index of the element to return.
-
getRequiredBytes
ByteString getRequiredBytes(int index)
repeated string required = 26;- Parameters:
index- The index of the value to return.
-
getArrayList
ProtocolStringList getArrayList()
Items in 'array' must be unique.repeated string array = 34;
-
getArrayCount
int getArrayCount()
Items in 'array' must be unique.repeated string array = 34;
-
getArray
String getArray(int index)
Items in 'array' must be unique.repeated string array = 34;- Parameters:
index- The index of the element to return.
-
getArrayBytes
ByteString getArrayBytes(int index)
Items in 'array' must be unique.repeated string array = 34;- Parameters:
index- The index of the value to return.
-
getTypeList
List<Openapiv2.JSONSchema.JSONSchemaSimpleTypes> getTypeList()
repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
-
getTypeCount
int getTypeCount()
repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
-
getType
Openapiv2.JSONSchema.JSONSchemaSimpleTypes getType(int index)
repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;- Parameters:
index- The index of the element to return.
-
getTypeValueList
List<Integer> getTypeValueList()
repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
-
getTypeValue
int getTypeValue(int index)
repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;- Parameters:
index- The index of the value to return.
-
getFormat
String getFormat()
`Format`string format = 36;
-
getFormatBytes
ByteString getFormatBytes()
`Format`string format = 36;
-
getEnumList
ProtocolStringList getEnumList()
Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1repeated string enum = 46;
-
getEnumCount
int getEnumCount()
Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1repeated string enum = 46;
-
getEnum
String getEnum(int index)
Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1repeated string enum = 46;- Parameters:
index- The index of the element to return.
-
getEnumBytes
ByteString getEnumBytes(int index)
Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1repeated string enum = 46;- Parameters:
index- The index of the value to return.
-
hasFieldConfiguration
boolean hasFieldConfiguration()
Additional field level properties used when generating the OpenAPI v2 file..grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001;
-
getFieldConfiguration
Openapiv2.JSONSchema.FieldConfiguration getFieldConfiguration()
Additional field level properties used when generating the OpenAPI v2 file..grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001;
-
getFieldConfigurationOrBuilder
Openapiv2.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder()
Additional field level properties used when generating the OpenAPI v2 file..grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001;
-
getExtensionsCount
int getExtensionsCount()
map<string, .google.protobuf.Value> extensions = 48;
-
containsExtensions
boolean containsExtensions(String key)
map<string, .google.protobuf.Value> extensions = 48;
-
getExtensions
@Deprecated() Map<String, Value> getExtensions()
Use getExtensionsMap instead.
-
getExtensionsMap
Map<String, Value> getExtensionsMap()
map<string, .google.protobuf.Value> extensions = 48;
-
getExtensionsOrDefault
Value getExtensionsOrDefault(String key, Value defaultValue)
map<string, .google.protobuf.Value> extensions = 48;
-
getExtensionsOrThrow
Value getExtensionsOrThrow(String key)
map<string, .google.protobuf.Value> extensions = 48;
-
isInitialized
final boolean isInitialized()
-
writeTo
void writeTo(CodedOutputStream output)
-
getSerializedSize
int getSerializedSize()
-
equals
boolean equals(Object obj)
-
hashCode
int hashCode()
-
parseFrom
static Openapiv2.JSONSchema parseFrom(ByteBuffer data)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(ByteString data)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(Array<byte> data)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(Array<byte> data, ExtensionRegistryLite extensionRegistry)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(InputStream input)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
-
parseDelimitedFrom
static Openapiv2.JSONSchema parseDelimitedFrom(InputStream input)
-
parseDelimitedFrom
static Openapiv2.JSONSchema parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(CodedInputStream input)
-
parseFrom
static Openapiv2.JSONSchema parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
-
newBuilderForType
Openapiv2.JSONSchema.Builder newBuilderForType()
-
newBuilder
static Openapiv2.JSONSchema.Builder newBuilder()
-
newBuilder
static Openapiv2.JSONSchema.Builder newBuilder(Openapiv2.JSONSchema prototype)
-
toBuilder
Openapiv2.JSONSchema.Builder toBuilder()
-
getDefaultInstance
static Openapiv2.JSONSchema getDefaultInstance()
-
parser
static Parser<Openapiv2.JSONSchema> parser()
-
getParserForType
Parser<Openapiv2.JSONSchema> getParserForType()
-
getDefaultInstanceForType
Openapiv2.JSONSchema getDefaultInstanceForType()
-
-
-
-