Skip to main content

Interface: ISchema

protoc_gen_openapiv2.options.ISchema

Properties of a Schema.

Implemented by

Properties

discriminator

Optional discriminator: null | string

Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.


example

Optional example: null | string

A free-form property to include an example of an instance for this schema in JSON. This is copied verbatim to the output.


externalDocs

Optional externalDocs: null | IExternalDocumentation

Additional external documentation for this schema.


jsonSchema

Optional jsonSchema: null | IJSONSchema

Schema jsonSchema


readOnly

Optional readOnly: null | boolean

Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false.