Documentation ¶
Index ¶
- Variables
- func GetDescriptionOrComment(name NameWithSourceResolver, description DescriptionResolver) string
- func GetDescriptionOrEmpty(description DescriptionResolver) string
- func GetEntrypointMessage(pluginOptions *PluginOptions, fileOptions *FileOptions) string
- func GetTitleOrEmpty(title TitleResolver) string
- type ArrayKeywords
- func (*ArrayKeywords) Descriptor() ([]byte, []int)deprecated
- func (x *ArrayKeywords) GetMaxItems() uint32
- func (x *ArrayKeywords) GetMinItems() uint32
- func (x *ArrayKeywords) GetUniqueItems() bool
- func (*ArrayKeywords) ProtoMessage()
- func (x *ArrayKeywords) ProtoReflect() protoreflect.Message
- func (x *ArrayKeywords) Reset()
- func (x *ArrayKeywords) String() string
- type DescriptionResolver
- type Draft
- type EnumOptions
- func (*EnumOptions) Descriptor() ([]byte, []int)deprecated
- func (x *EnumOptions) GetDescription() string
- func (x *EnumOptions) GetMappingType() EnumOptions_MappingType
- func (x *EnumOptions) GetTitle() string
- func (*EnumOptions) ProtoMessage()
- func (x *EnumOptions) ProtoReflect() protoreflect.Message
- func (x *EnumOptions) Reset()
- func (x *EnumOptions) String() string
- type EnumOptions_MappingType
- func (EnumOptions_MappingType) Descriptor() protoreflect.EnumDescriptor
- func (x EnumOptions_MappingType) Enum() *EnumOptions_MappingType
- func (EnumOptions_MappingType) EnumDescriptor() ([]byte, []int)deprecated
- func (x EnumOptions_MappingType) Number() protoreflect.EnumNumber
- func (x EnumOptions_MappingType) String() string
- func (EnumOptions_MappingType) Type() protoreflect.EnumType
- type EnumValueOptions
- type FieldOptions
- func (*FieldOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FieldOptions) GetArray() *ArrayKeywords
- func (x *FieldOptions) GetDefault() *anypb.Any
- func (x *FieldOptions) GetDescription() string
- func (x *FieldOptions) GetNullable() bool
- func (x *FieldOptions) GetNumeric() *NumericKeywords
- func (x *FieldOptions) GetString_() *StringKeywords
- func (x *FieldOptions) GetTitle() string
- func (x *FieldOptions) GetVisibilityLevel() uint32
- 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) GetDescription() string
- func (x *FileOptions) GetEntrypointMessage() string
- func (x *FileOptions) GetTitle() string
- func (x *FileOptions) GetVisibilityLevel() uint32
- 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) GetDescription() string
- func (x *MessageOptions) GetObject() *ObjectKeywords
- func (x *MessageOptions) GetTitle() string
- func (x *MessageOptions) GetVisibilityLevel() uint32
- func (*MessageOptions) ProtoMessage()
- func (x *MessageOptions) ProtoReflect() protoreflect.Message
- func (x *MessageOptions) Reset()
- func (x *MessageOptions) String() string
- type NameWithSourceResolver
- type NumericKeywords
- func (*NumericKeywords) Descriptor() ([]byte, []int)deprecated
- func (x *NumericKeywords) GetExclusiveMaximum() float64
- func (x *NumericKeywords) GetExclusiveMinimum() float64
- func (x *NumericKeywords) GetInclusiveMaximum() float64
- func (x *NumericKeywords) GetInclusiveMinimum() float64
- func (m *NumericKeywords) GetMax() isNumericKeywords_Max
- func (m *NumericKeywords) GetMin() isNumericKeywords_Min
- func (x *NumericKeywords) GetMultipleOf() int32
- func (*NumericKeywords) ProtoMessage()
- func (x *NumericKeywords) ProtoReflect() protoreflect.Message
- func (x *NumericKeywords) Reset()
- func (x *NumericKeywords) String() string
- type NumericKeywords_ExclusiveMaximum
- type NumericKeywords_ExclusiveMinimum
- type NumericKeywords_InclusiveMaximum
- type NumericKeywords_InclusiveMinimum
- type ObjectKeywords
- func (*ObjectKeywords) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectKeywords) GetAdditionalProperties() bool
- func (x *ObjectKeywords) GetMaxProperties() uint32
- func (x *ObjectKeywords) GetMinProperties() uint32
- func (*ObjectKeywords) ProtoMessage()
- func (x *ObjectKeywords) ProtoReflect() protoreflect.Message
- func (x *ObjectKeywords) Reset()
- func (x *ObjectKeywords) String() string
- type PluginOptions
- func (*PluginOptions) Descriptor() ([]byte, []int)deprecated
- func (x *PluginOptions) GetDraft() Draft
- func (x *PluginOptions) GetEntrypointMessage() string
- func (x *PluginOptions) GetInt64AsString() bool
- func (x *PluginOptions) GetMandatoryNullable() bool
- func (x *PluginOptions) GetOutputFileSuffix() string
- func (x *PluginOptions) GetPrettyJsonOutput() bool
- func (x *PluginOptions) GetVisibilityLevel() uint32
- func (*PluginOptions) ProtoMessage()
- func (x *PluginOptions) ProtoReflect() protoreflect.Message
- func (x *PluginOptions) Reset()
- func (x *PluginOptions) String() string
- type StringKeywords
- func (*StringKeywords) Descriptor() ([]byte, []int)deprecated
- func (x *StringKeywords) GetFormat() string
- func (x *StringKeywords) GetMaxLength() uint32
- func (x *StringKeywords) GetMinLength() uint32
- func (x *StringKeywords) GetPattern() string
- func (*StringKeywords) ProtoMessage()
- func (x *StringKeywords) ProtoReflect() protoreflect.Message
- func (x *StringKeywords) Reset()
- func (x *StringKeywords) String() string
- type TitleResolver
Constants ¶
This section is empty.
Variables ¶
var ( Draft_name = map[int32]string{ 0: "DraftDefault", 1: "Draft04", 2: "Draft05", 3: "Draft06", 4: "Draft07", 5: "Draft201909", 6: "Draft202012", } Draft_value = map[string]int32{ "DraftDefault": 0, "Draft04": 1, "Draft05": 2, "Draft06": 3, "Draft07": 4, "Draft201909": 5, "Draft202012": 6, } )
Enum value maps for Draft.
var ( EnumOptions_MappingType_name = map[int32]string{ 0: "MapToString", 1: "MapToNumber", 2: "MapToCustom", } EnumOptions_MappingType_value = map[string]int32{ "MapToString": 0, "MapToNumber": 1, "MapToCustom": 2, } )
Enum value maps for EnumOptions_MappingType.
var (
// optional ceggebor.jsonschema.EnumOptions enum = 11344;
E_Enum = &file_jsonschema_proto_extTypes[3]
)
Extension fields to descriptorpb.EnumOptions.
var (
// optional ceggebor.jsonschema.EnumValueOptions enum_value = 11345;
E_EnumValue = &file_jsonschema_proto_extTypes[4]
)
Extension fields to descriptorpb.EnumValueOptions.
var (
// optional ceggebor.jsonschema.FieldOptions field = 11343;
E_Field = &file_jsonschema_proto_extTypes[2]
)
Extension fields to descriptorpb.FieldOptions.
var (
// optional ceggebor.jsonschema.FileOptions file = 11341;
E_File = &file_jsonschema_proto_extTypes[0]
)
Extension fields to descriptorpb.FileOptions.
var (
// optional ceggebor.jsonschema.MessageOptions message = 11342;
E_Message = &file_jsonschema_proto_extTypes[1]
)
Extension fields to descriptorpb.MessageOptions.
var File_jsonschema_proto protoreflect.FileDescriptor
Functions ¶
func GetDescriptionOrComment ¶
func GetDescriptionOrComment(name NameWithSourceResolver, description DescriptionResolver) string
func GetDescriptionOrEmpty ¶
func GetDescriptionOrEmpty(description DescriptionResolver) string
func GetEntrypointMessage ¶
func GetEntrypointMessage(pluginOptions *PluginOptions, fileOptions *FileOptions) string
func GetTitleOrEmpty ¶
func GetTitleOrEmpty(title TitleResolver) string
Types ¶
type ArrayKeywords ¶
type ArrayKeywords struct { MinItems *uint32 `protobuf:"varint,1,opt,name=min_items,json=minItems,proto3,oneof" json:"min_items,omitempty"` MaxItems *uint32 `protobuf:"varint,2,opt,name=max_items,json=maxItems,proto3,oneof" json:"max_items,omitempty"` UniqueItems *bool `protobuf:"varint,3,opt,name=unique_items,json=uniqueItems,proto3,oneof" json:"unique_items,omitempty"` // contains filtered or unexported fields }
func (*ArrayKeywords) Descriptor
deprecated
func (*ArrayKeywords) Descriptor() ([]byte, []int)
Deprecated: Use ArrayKeywords.ProtoReflect.Descriptor instead.
func (*ArrayKeywords) GetMaxItems ¶
func (x *ArrayKeywords) GetMaxItems() uint32
func (*ArrayKeywords) GetMinItems ¶
func (x *ArrayKeywords) GetMinItems() uint32
func (*ArrayKeywords) GetUniqueItems ¶
func (x *ArrayKeywords) GetUniqueItems() bool
func (*ArrayKeywords) ProtoMessage ¶
func (*ArrayKeywords) ProtoMessage()
func (*ArrayKeywords) ProtoReflect ¶
func (x *ArrayKeywords) ProtoReflect() protoreflect.Message
func (*ArrayKeywords) Reset ¶
func (x *ArrayKeywords) Reset()
func (*ArrayKeywords) String ¶
func (x *ArrayKeywords) String() string
type DescriptionResolver ¶
type DescriptionResolver interface {
GetDescription() string
}
type Draft ¶
type Draft int32
func (Draft) Descriptor ¶
func (Draft) Descriptor() protoreflect.EnumDescriptor
func (Draft) EnumDescriptor
deprecated
func (Draft) Number ¶
func (x Draft) Number() protoreflect.EnumNumber
func (Draft) Type ¶
func (Draft) Type() protoreflect.EnumType
type EnumOptions ¶
type EnumOptions struct { MappingType EnumOptions_MappingType `` /* 144-byte string literal not displayed */ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func GetEnumOptions ¶
func GetEnumOptions(enum pgs.Enum) *EnumOptions
func (*EnumOptions) Descriptor
deprecated
func (*EnumOptions) Descriptor() ([]byte, []int)
Deprecated: Use EnumOptions.ProtoReflect.Descriptor instead.
func (*EnumOptions) GetDescription ¶
func (x *EnumOptions) GetDescription() string
func (*EnumOptions) GetMappingType ¶
func (x *EnumOptions) GetMappingType() EnumOptions_MappingType
func (*EnumOptions) GetTitle ¶
func (x *EnumOptions) GetTitle() string
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 EnumOptions_MappingType ¶
type EnumOptions_MappingType int32
const ( EnumOptions_MapToString EnumOptions_MappingType = 0 EnumOptions_MapToNumber EnumOptions_MappingType = 1 EnumOptions_MapToCustom EnumOptions_MappingType = 2 )
func (EnumOptions_MappingType) Descriptor ¶
func (EnumOptions_MappingType) Descriptor() protoreflect.EnumDescriptor
func (EnumOptions_MappingType) Enum ¶
func (x EnumOptions_MappingType) Enum() *EnumOptions_MappingType
func (EnumOptions_MappingType) EnumDescriptor
deprecated
func (EnumOptions_MappingType) EnumDescriptor() ([]byte, []int)
Deprecated: Use EnumOptions_MappingType.Descriptor instead.
func (EnumOptions_MappingType) Number ¶
func (x EnumOptions_MappingType) Number() protoreflect.EnumNumber
func (EnumOptions_MappingType) String ¶
func (x EnumOptions_MappingType) String() string
func (EnumOptions_MappingType) Type ¶
func (EnumOptions_MappingType) Type() protoreflect.EnumType
type EnumValueOptions ¶
type EnumValueOptions struct { CustomValue *anypb.Any `protobuf:"bytes,10,opt,name=custom_value,json=customValue,proto3" json:"custom_value,omitempty"` // contains filtered or unexported fields }
func GetEnumValueOptions ¶
func GetEnumValueOptions(enumValue pgs.EnumValue) *EnumValueOptions
func (*EnumValueOptions) Descriptor
deprecated
func (*EnumValueOptions) Descriptor() ([]byte, []int)
Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor instead.
func (*EnumValueOptions) GetCustomValue ¶
func (x *EnumValueOptions) GetCustomValue() *anypb.Any
func (*EnumValueOptions) ProtoMessage ¶
func (*EnumValueOptions) ProtoMessage()
func (*EnumValueOptions) ProtoReflect ¶
func (x *EnumValueOptions) ProtoReflect() protoreflect.Message
func (*EnumValueOptions) Reset ¶
func (x *EnumValueOptions) Reset()
func (*EnumValueOptions) String ¶
func (x *EnumValueOptions) String() string
type FieldOptions ¶
type FieldOptions struct { //* //WIP: visibility_level is used to determine which message should be generated. //Currently not work. VisibilityLevel uint32 `protobuf:"varint,1,opt,name=visibility_level,json=visibilityLevel,proto3" json:"visibility_level,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Nullable bool `protobuf:"varint,5,opt,name=nullable,proto3" json:"nullable,omitempty"` Default *anypb.Any `protobuf:"bytes,10,opt,name=default,proto3" json:"default,omitempty"` Array *ArrayKeywords `protobuf:"bytes,11,opt,name=array,proto3" json:"array,omitempty"` Numeric *NumericKeywords `protobuf:"bytes,12,opt,name=numeric,proto3" json:"numeric,omitempty"` String_ *StringKeywords `protobuf:"bytes,13,opt,name=string,proto3" json:"string,omitempty"` // contains filtered or unexported fields }
func GetFieldOptions ¶
func GetFieldOptions(field pgs.Field) *FieldOptions
func (*FieldOptions) Descriptor
deprecated
func (*FieldOptions) Descriptor() ([]byte, []int)
Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead.
func (*FieldOptions) GetArray ¶
func (x *FieldOptions) GetArray() *ArrayKeywords
func (*FieldOptions) GetDefault ¶
func (x *FieldOptions) GetDefault() *anypb.Any
func (*FieldOptions) GetDescription ¶
func (x *FieldOptions) GetDescription() string
func (*FieldOptions) GetNullable ¶
func (x *FieldOptions) GetNullable() bool
func (*FieldOptions) GetNumeric ¶
func (x *FieldOptions) GetNumeric() *NumericKeywords
func (*FieldOptions) GetString_ ¶
func (x *FieldOptions) GetString_() *StringKeywords
func (*FieldOptions) GetTitle ¶
func (x *FieldOptions) GetTitle() string
func (*FieldOptions) GetVisibilityLevel ¶
func (x *FieldOptions) GetVisibilityLevel() uint32
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 { //* //WIP: visibility_level is used to determine which message should be generated. //Currently not work. VisibilityLevel uint32 `protobuf:"varint,1,opt,name=visibility_level,json=visibilityLevel,proto3" json:"visibility_level,omitempty"` //* //entrypoint_message is used which message should be entrypoint object of schema. //default: inherit from PluginOptions.entrypoint_message EntrypointMessage string `protobuf:"bytes,2,opt,name=entrypoint_message,json=entrypointMessage,proto3" json:"entrypoint_message,omitempty"` Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func GetFileOptions ¶
func GetFileOptions(file pgs.File) *FileOptions
func (*FileOptions) Descriptor
deprecated
func (*FileOptions) Descriptor() ([]byte, []int)
Deprecated: Use FileOptions.ProtoReflect.Descriptor instead.
func (*FileOptions) GetDescription ¶
func (x *FileOptions) GetDescription() string
func (*FileOptions) GetEntrypointMessage ¶
func (x *FileOptions) GetEntrypointMessage() string
func (*FileOptions) GetTitle ¶
func (x *FileOptions) GetTitle() string
func (*FileOptions) GetVisibilityLevel ¶
func (x *FileOptions) GetVisibilityLevel() uint32
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 { //* //WIP: visibility_level is used to determine which message should be generated. //Currently not work. VisibilityLevel uint32 `protobuf:"varint,1,opt,name=visibility_level,json=visibilityLevel,proto3" json:"visibility_level,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Object *ObjectKeywords `protobuf:"bytes,10,opt,name=object,proto3" json:"object,omitempty"` // contains filtered or unexported fields }
func GetMessageOptions ¶
func GetMessageOptions(message pgs.Message) *MessageOptions
func (*MessageOptions) Descriptor
deprecated
func (*MessageOptions) Descriptor() ([]byte, []int)
Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead.
func (*MessageOptions) GetDescription ¶
func (x *MessageOptions) GetDescription() string
func (*MessageOptions) GetObject ¶
func (x *MessageOptions) GetObject() *ObjectKeywords
func (*MessageOptions) GetTitle ¶
func (x *MessageOptions) GetTitle() string
func (*MessageOptions) GetVisibilityLevel ¶
func (x *MessageOptions) GetVisibilityLevel() uint32
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
type NameWithSourceResolver ¶
type NameWithSourceResolver interface { SourceCodeInfo() pgs.SourceCodeInfo Name() pgs.Name }
type NumericKeywords ¶
type NumericKeywords struct { // Types that are assignable to Min: // *NumericKeywords_InclusiveMinimum // *NumericKeywords_ExclusiveMinimum Min isNumericKeywords_Min `protobuf_oneof:"min"` // Types that are assignable to Max: // *NumericKeywords_InclusiveMaximum // *NumericKeywords_ExclusiveMaximum Max isNumericKeywords_Max `protobuf_oneof:"max"` MultipleOf *int32 `protobuf:"varint,5,opt,name=multiple_of,json=multipleOf,proto3,oneof" json:"multiple_of,omitempty"` // contains filtered or unexported fields }
func (*NumericKeywords) Descriptor
deprecated
func (*NumericKeywords) Descriptor() ([]byte, []int)
Deprecated: Use NumericKeywords.ProtoReflect.Descriptor instead.
func (*NumericKeywords) GetExclusiveMaximum ¶
func (x *NumericKeywords) GetExclusiveMaximum() float64
func (*NumericKeywords) GetExclusiveMinimum ¶
func (x *NumericKeywords) GetExclusiveMinimum() float64
func (*NumericKeywords) GetInclusiveMaximum ¶
func (x *NumericKeywords) GetInclusiveMaximum() float64
func (*NumericKeywords) GetInclusiveMinimum ¶
func (x *NumericKeywords) GetInclusiveMinimum() float64
func (*NumericKeywords) GetMax ¶
func (m *NumericKeywords) GetMax() isNumericKeywords_Max
func (*NumericKeywords) GetMin ¶
func (m *NumericKeywords) GetMin() isNumericKeywords_Min
func (*NumericKeywords) GetMultipleOf ¶
func (x *NumericKeywords) GetMultipleOf() int32
func (*NumericKeywords) ProtoMessage ¶
func (*NumericKeywords) ProtoMessage()
func (*NumericKeywords) ProtoReflect ¶
func (x *NumericKeywords) ProtoReflect() protoreflect.Message
func (*NumericKeywords) Reset ¶
func (x *NumericKeywords) Reset()
func (*NumericKeywords) String ¶
func (x *NumericKeywords) String() string
type NumericKeywords_ExclusiveMaximum ¶
type NumericKeywords_ExclusiveMaximum struct {
ExclusiveMaximum float64 `protobuf:"fixed64,4,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3,oneof"`
}
type NumericKeywords_ExclusiveMinimum ¶
type NumericKeywords_ExclusiveMinimum struct {
ExclusiveMinimum float64 `protobuf:"fixed64,3,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3,oneof"`
}
type NumericKeywords_InclusiveMaximum ¶
type NumericKeywords_InclusiveMaximum struct {
InclusiveMaximum float64 `protobuf:"fixed64,2,opt,name=inclusive_maximum,json=inclusiveMaximum,proto3,oneof"`
}
type NumericKeywords_InclusiveMinimum ¶
type NumericKeywords_InclusiveMinimum struct {
InclusiveMinimum float64 `protobuf:"fixed64,1,opt,name=inclusive_minimum,json=inclusiveMinimum,proto3,oneof"`
}
type ObjectKeywords ¶
type ObjectKeywords struct { AdditionalProperties *bool `` /* 128-byte string literal not displayed */ // repeated JsonSchema additional_properties = 10; MinProperties *uint32 `protobuf:"varint,2,opt,name=min_properties,json=minProperties,proto3,oneof" json:"min_properties,omitempty"` MaxProperties *uint32 `protobuf:"varint,3,opt,name=max_properties,json=maxProperties,proto3,oneof" json:"max_properties,omitempty"` // contains filtered or unexported fields }
func (*ObjectKeywords) Descriptor
deprecated
func (*ObjectKeywords) Descriptor() ([]byte, []int)
Deprecated: Use ObjectKeywords.ProtoReflect.Descriptor instead.
func (*ObjectKeywords) GetAdditionalProperties ¶
func (x *ObjectKeywords) GetAdditionalProperties() bool
func (*ObjectKeywords) GetMaxProperties ¶
func (x *ObjectKeywords) GetMaxProperties() uint32
func (*ObjectKeywords) GetMinProperties ¶
func (x *ObjectKeywords) GetMinProperties() uint32
func (*ObjectKeywords) ProtoMessage ¶
func (*ObjectKeywords) ProtoMessage()
func (*ObjectKeywords) ProtoReflect ¶
func (x *ObjectKeywords) ProtoReflect() protoreflect.Message
func (*ObjectKeywords) Reset ¶
func (x *ObjectKeywords) Reset()
func (*ObjectKeywords) String ¶
func (x *ObjectKeywords) String() string
type PluginOptions ¶
type PluginOptions struct { //* //WIP: visibility_level is used to determine which message should be generated. //Currently not work. VisibilityLevel uint32 `protobuf:"varint,1,opt,name=visibility_level,json=visibilityLevel,proto3" json:"visibility_level,omitempty"` //* //entrypoint_message is used which message should be entrypoint object of schema. // //default: null or empty //example: //- --jsonschema_opt=entrypoint_message=MyMessage EntrypointMessage string `protobuf:"bytes,2,opt,name=entrypoint_message,json=entrypointMessage,proto3" json:"entrypoint_message,omitempty"` //* //output_file_suffix is used to determine output file name suffix. //Values should end with '.json' or '.yaml' or '.yml'. // //default: .schema.json //example: //- --jsonschema_opt=output_file_suffix=.schema.json //- --jsonschema_opt=output_file_suffix=.schema.yaml OutputFileSuffix string `protobuf:"bytes,10,opt,name=output_file_suffix,json=outputFileSuffix,proto3" json:"output_file_suffix,omitempty"` //* //pretty_json_output is used to determine output json should be pretty printed. //This option is only used when output_file_suffix is '.json'. // //default: true //example: //- --jsonschema_opt=pretty_json_output=true //- --jsonschema_opt=pretty_json_output=false PrettyJsonOutput bool `protobuf:"varint,11,opt,name=pretty_json_output,json=prettyJsonOutput,proto3" json:"pretty_json_output,omitempty"` //* //draft is used to determine which draft version should be used. // //default: Draft202012 //example: //- --jsonschema_opt=draft=Draft202012 Draft Draft `protobuf:"varint,12,opt,name=draft,proto3,enum=ceggebor.jsonschema.Draft" json:"draft,omitempty"` //* //mandatory_nullable determines whether this plugin should treat optional field as nullable. //Many programming languages do not differentiate between undefined and null. //However, scripting languages like JavaScript and TypeScript can distinguish between them. //By default, optional field is treated as nullable and undefined. // //default: false //example: //- --jsonschema_opt=mandatory_nullable=true //- --jsonschema_opt=mandatory_nullable=false MandatoryNullable bool `protobuf:"varint,13,opt,name=mandatory_nullable,json=mandatoryNullable,proto3" json:"mandatory_nullable,omitempty"` //* //int64_as_string determines whether int64 field treat as string. //Depends on Javascript specification, The JS stores integer to only 53bits. //So, if you want to use int64 field in JS, you should use string type. //References: // // //default: false //example: //- --jsonschema_opt=int64_as_string=true //- --jsonschema_opt=int64_as_string=false Int64AsString bool `protobuf:"varint,14,opt,name=int64_as_string,json=int64AsString,proto3" json:"int64_as_string,omitempty"` // contains filtered or unexported fields }
Not extendable, just define structure Plugin wide options
func GetPluginOptions ¶
func GetPluginOptions(params pgs.Parameters) *PluginOptions
func (*PluginOptions) Descriptor
deprecated
func (*PluginOptions) Descriptor() ([]byte, []int)
Deprecated: Use PluginOptions.ProtoReflect.Descriptor instead.
func (*PluginOptions) GetDraft ¶
func (x *PluginOptions) GetDraft() Draft
func (*PluginOptions) GetEntrypointMessage ¶
func (x *PluginOptions) GetEntrypointMessage() string
func (*PluginOptions) GetInt64AsString ¶
func (x *PluginOptions) GetInt64AsString() bool
func (*PluginOptions) GetMandatoryNullable ¶
func (x *PluginOptions) GetMandatoryNullable() bool
func (*PluginOptions) GetOutputFileSuffix ¶
func (x *PluginOptions) GetOutputFileSuffix() string
func (*PluginOptions) GetPrettyJsonOutput ¶
func (x *PluginOptions) GetPrettyJsonOutput() bool
func (*PluginOptions) GetVisibilityLevel ¶
func (x *PluginOptions) GetVisibilityLevel() uint32
func (*PluginOptions) ProtoMessage ¶
func (*PluginOptions) ProtoMessage()
func (*PluginOptions) ProtoReflect ¶
func (x *PluginOptions) ProtoReflect() protoreflect.Message
func (*PluginOptions) Reset ¶
func (x *PluginOptions) Reset()
func (*PluginOptions) String ¶
func (x *PluginOptions) String() string
type StringKeywords ¶
type StringKeywords struct { MinLength *uint32 `protobuf:"varint,1,opt,name=min_length,json=minLength,proto3,oneof" json:"min_length,omitempty"` MaxLength *uint32 `protobuf:"varint,2,opt,name=max_length,json=maxLength,proto3,oneof" json:"max_length,omitempty"` Pattern string `protobuf:"bytes,3,opt,name=pattern,proto3" json:"pattern,omitempty"` Format string `protobuf:"bytes,4,opt,name=format,proto3" json:"format,omitempty"` // contains filtered or unexported fields }
func (*StringKeywords) Descriptor
deprecated
func (*StringKeywords) Descriptor() ([]byte, []int)
Deprecated: Use StringKeywords.ProtoReflect.Descriptor instead.
func (*StringKeywords) GetFormat ¶
func (x *StringKeywords) GetFormat() string
func (*StringKeywords) GetMaxLength ¶
func (x *StringKeywords) GetMaxLength() uint32
func (*StringKeywords) GetMinLength ¶
func (x *StringKeywords) GetMinLength() uint32
func (*StringKeywords) GetPattern ¶
func (x *StringKeywords) GetPattern() string
func (*StringKeywords) ProtoMessage ¶
func (*StringKeywords) ProtoMessage()
func (*StringKeywords) ProtoReflect ¶
func (x *StringKeywords) ProtoReflect() protoreflect.Message
func (*StringKeywords) Reset ¶
func (x *StringKeywords) Reset()
func (*StringKeywords) String ¶
func (x *StringKeywords) String() string
type TitleResolver ¶
type TitleResolver interface {
GetTitle() string
}