Documentation ¶
Index ¶
- Variables
- type EnumOptions
- func (*EnumOptions) Descriptor() ([]byte, []int)deprecated
- func (x *EnumOptions) GetEnumsAsConstants() bool
- func (x *EnumOptions) GetEnumsAsStringsOnly() bool
- func (x *EnumOptions) GetEnumsTrimPrefix() bool
- func (x *EnumOptions) GetIgnore() bool
- func (*EnumOptions) ProtoMessage()
- func (x *EnumOptions) ProtoReflect() protoreflect.Message
- func (x *EnumOptions) Reset()
- func (x *EnumOptions) String() string
- type FieldOptions
- func (*FieldOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FieldOptions) GetIgnore() bool
- func (x *FieldOptions) GetMaxLength() int32
- func (x *FieldOptions) GetMinLength() int32
- func (x *FieldOptions) GetPattern() string
- func (x *FieldOptions) GetRequired() bool
- func (*FieldOptions) ProtoMessage()
- func (x *FieldOptions) ProtoReflect() protoreflect.Message
- func (x *FieldOptions) Reset()
- func (x *FieldOptions) String() string
- type FileOptions
- func (*FileOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FileOptions) GetExtension() string
- func (x *FileOptions) GetIgnore() bool
- func (*FileOptions) ProtoMessage()
- func (x *FileOptions) ProtoReflect() protoreflect.Message
- func (x *FileOptions) Reset()
- func (x *FileOptions) String() string
- type MessageOptions
- func (*MessageOptions) Descriptor() ([]byte, []int)deprecated
- func (x *MessageOptions) GetAllFieldsRequired() bool
- func (x *MessageOptions) GetAllowNullValues() bool
- func (x *MessageOptions) GetDisallowAdditionalProperties() bool
- func (x *MessageOptions) GetEnumsAsConstants() bool
- func (x *MessageOptions) GetIgnore() bool
- func (*MessageOptions) ProtoMessage()
- func (x *MessageOptions) ProtoReflect() protoreflect.Message
- func (x *MessageOptions) Reset()
- func (x *MessageOptions) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// optional protoc.gen.jsonschema.EnumOptions enum_options = 1128;
E_EnumOptions = &file_options_proto_extTypes[3]
)
Extension fields to descriptorpb.EnumOptions.
View Source
var (
// optional protoc.gen.jsonschema.FieldOptions field_options = 1125;
E_FieldOptions = &file_options_proto_extTypes[0]
)
Extension fields to descriptorpb.FieldOptions.
View Source
var (
// optional protoc.gen.jsonschema.FileOptions file_options = 1126;
E_FileOptions = &file_options_proto_extTypes[1]
)
Extension fields to descriptorpb.FileOptions.
View Source
var (
// optional protoc.gen.jsonschema.MessageOptions message_options = 1127;
E_MessageOptions = &file_options_proto_extTypes[2]
)
Extension fields to descriptorpb.MessageOptions.
View Source
var File_options_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type EnumOptions ¶
type EnumOptions struct { // Enums tagged with this will have be encoded to use constants instead of simple types (supports value annotations): EnumsAsConstants bool `protobuf:"varint,1,opt,name=enums_as_constants,json=enumsAsConstants,proto3" json:"enums_as_constants,omitempty"` // Enums tagged with this will only provide string values as options (not their numerical equivalents): EnumsAsStringsOnly bool `protobuf:"varint,2,opt,name=enums_as_strings_only,json=enumsAsStringsOnly,proto3" json:"enums_as_strings_only,omitempty"` // Enums tagged with this will have enum name prefix removed from values: EnumsTrimPrefix bool `protobuf:"varint,3,opt,name=enums_trim_prefix,json=enumsTrimPrefix,proto3" json:"enums_trim_prefix,omitempty"` // Enums tagged with this will not be processed Ignore bool `protobuf:"varint,4,opt,name=ignore,proto3" json:"ignore,omitempty"` // contains filtered or unexported fields }
Custom EnumOptions
func (*EnumOptions) Descriptor
deprecated
func (*EnumOptions) Descriptor() ([]byte, []int)
Deprecated: Use EnumOptions.ProtoReflect.Descriptor instead.
func (*EnumOptions) GetEnumsAsConstants ¶
func (x *EnumOptions) GetEnumsAsConstants() bool
func (*EnumOptions) GetEnumsAsStringsOnly ¶
func (x *EnumOptions) GetEnumsAsStringsOnly() bool
func (*EnumOptions) GetEnumsTrimPrefix ¶
func (x *EnumOptions) GetEnumsTrimPrefix() bool
func (*EnumOptions) GetIgnore ¶
func (x *EnumOptions) GetIgnore() bool
func (*EnumOptions) ProtoMessage ¶
func (*EnumOptions) ProtoMessage()
func (*EnumOptions) ProtoReflect ¶
func (x *EnumOptions) ProtoReflect() protoreflect.Message
func (*EnumOptions) Reset ¶
func (x *EnumOptions) Reset()
func (*EnumOptions) String ¶
func (x *EnumOptions) String() string
type FieldOptions ¶
type FieldOptions struct { // Fields tagged with this will be omitted from generated schemas Ignore bool `protobuf:"varint,1,opt,name=ignore,proto3" json:"ignore,omitempty"` // Fields tagged with this will be marked as "required" in generated schemas Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` // Fields tagged with this will constrain strings using the "minLength" keyword in generated schemas MinLength int32 `protobuf:"varint,3,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` // Fields tagged with this will constrain strings using the "maxLength" keyword in generated schemas MaxLength int32 `protobuf:"varint,4,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` // Fields tagged with this will constrain strings using the "pattern" keyword in generated schemas Pattern string `protobuf:"bytes,5,opt,name=pattern,proto3" json:"pattern,omitempty"` // contains filtered or unexported fields }
Custom FieldOptions
func (*FieldOptions) Descriptor
deprecated
func (*FieldOptions) Descriptor() ([]byte, []int)
Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead.
func (*FieldOptions) GetIgnore ¶
func (x *FieldOptions) GetIgnore() bool
func (*FieldOptions) GetMaxLength ¶
func (x *FieldOptions) GetMaxLength() int32
func (*FieldOptions) GetMinLength ¶
func (x *FieldOptions) GetMinLength() int32
func (*FieldOptions) GetPattern ¶
func (x *FieldOptions) GetPattern() string
func (*FieldOptions) GetRequired ¶
func (x *FieldOptions) GetRequired() bool
func (*FieldOptions) ProtoMessage ¶
func (*FieldOptions) ProtoMessage()
func (*FieldOptions) ProtoReflect ¶
func (x *FieldOptions) ProtoReflect() protoreflect.Message
func (*FieldOptions) Reset ¶
func (x *FieldOptions) Reset()
func (*FieldOptions) String ¶
func (x *FieldOptions) String() string
type FileOptions ¶
type FileOptions struct { // Files tagged with this will not be processed Ignore bool `protobuf:"varint,1,opt,name=ignore,proto3" json:"ignore,omitempty"` // Override the default file extension for schemas generated from this file Extension string `protobuf:"bytes,2,opt,name=extension,proto3" json:"extension,omitempty"` // contains filtered or unexported fields }
Custom FileOptions
func (*FileOptions) Descriptor
deprecated
func (*FileOptions) Descriptor() ([]byte, []int)
Deprecated: Use FileOptions.ProtoReflect.Descriptor instead.
func (*FileOptions) GetExtension ¶
func (x *FileOptions) GetExtension() string
func (*FileOptions) GetIgnore ¶
func (x *FileOptions) GetIgnore() bool
func (*FileOptions) ProtoMessage ¶
func (*FileOptions) ProtoMessage()
func (*FileOptions) ProtoReflect ¶
func (x *FileOptions) ProtoReflect() protoreflect.Message
func (*FileOptions) Reset ¶
func (x *FileOptions) Reset()
func (*FileOptions) String ¶
func (x *FileOptions) String() string
type MessageOptions ¶
type MessageOptions struct { // Messages tagged with this will not be processed Ignore bool `protobuf:"varint,1,opt,name=ignore,proto3" json:"ignore,omitempty"` // Messages tagged with this will have all fields marked as "required": AllFieldsRequired bool `protobuf:"varint,2,opt,name=all_fields_required,json=allFieldsRequired,proto3" json:"all_fields_required,omitempty"` // Messages tagged with this will additionally accept null values for all properties: AllowNullValues bool `protobuf:"varint,3,opt,name=allow_null_values,json=allowNullValues,proto3" json:"allow_null_values,omitempty"` // Messages tagged with this will have all fields marked as not allowing additional properties: DisallowAdditionalProperties bool `` /* 148-byte string literal not displayed */ // Messages tagged with this will have all nested enums encoded to use constants instead of simple types (supports value annotations): EnumsAsConstants bool `protobuf:"varint,5,opt,name=enums_as_constants,json=enumsAsConstants,proto3" json:"enums_as_constants,omitempty"` // contains filtered or unexported fields }
Custom MessageOptions
func (*MessageOptions) Descriptor
deprecated
func (*MessageOptions) Descriptor() ([]byte, []int)
Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead.
func (*MessageOptions) GetAllFieldsRequired ¶
func (x *MessageOptions) GetAllFieldsRequired() bool
func (*MessageOptions) GetAllowNullValues ¶
func (x *MessageOptions) GetAllowNullValues() bool
func (*MessageOptions) GetDisallowAdditionalProperties ¶
func (x *MessageOptions) GetDisallowAdditionalProperties() bool
func (*MessageOptions) GetEnumsAsConstants ¶
func (x *MessageOptions) GetEnumsAsConstants() bool
func (*MessageOptions) GetIgnore ¶
func (x *MessageOptions) GetIgnore() bool
func (*MessageOptions) ProtoMessage ¶
func (*MessageOptions) ProtoMessage()
func (*MessageOptions) ProtoReflect ¶
func (x *MessageOptions) ProtoReflect() protoreflect.Message
func (*MessageOptions) Reset ¶
func (x *MessageOptions) Reset()
func (*MessageOptions) String ¶
func (x *MessageOptions) String() string
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
protoc-gen-jsonschema
protoc plugin which converts .proto to JSON schema It is called by protoc and generates JSON-schema files.
|
protoc plugin which converts .proto to JSON schema It is called by protoc and generates JSON-schema files. |
internal
|
|
Click to show internal directories.
Click to hide internal directories.