Package 

Class Openapiv2.JSONSchema

  • 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
                        
    `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."
           }];
     }
    
    Protobuf type grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
    • Constructor Detail

    • Method Detail

      • 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;

      • 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#schemaObject
        
        string 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#schemaObject
        
        string example = 9;
      • getMaximum

         double getMaximum()
        Maximum represents an inclusive upper limit for a numeric instance. The
        value of MUST be a number,
        
        double maximum = 11;
      • getMinimum

         double getMinimum()
        minimum represents an inclusive lower limit for a numeric instance. The
        value of MUST be a number,
        
        double minimum = 13;
      • getPattern

         String getPattern()

        string pattern = 17;

      • getMaxItems

         long getMaxItems()

        uint64 max_items = 20;

      • getMinItems

         long getMinItems()

        uint64 min_items = 21;

      • getRequiredList

         ProtocolStringList getRequiredList()

        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.
      • getTypeCount

         int getTypeCount()

        repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;

      • 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.1
        
        repeated 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.1
        
        repeated 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.1
        
        repeated 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.1
        
        repeated 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;
      • getExtensionsCount

         int getExtensionsCount()

        map<string, .google.protobuf.Value> extensions = 48;

      • containsExtensions

         boolean containsExtensions(String key)

        map<string, .google.protobuf.Value> extensions = 48;

      • 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;

      • writeTo

         void writeTo(CodedOutputStream output)
      • equals

         boolean equals(Object obj)