Documentation
¶
Index ¶
- func LowercaseFirstCharacter(str string) string
- func SchemaHasAdditionalProperties(schema *openapi3.Schema) bool
- func SortedContentKeys(dict openapi3.Content) []string
- func SortedOperationsKeys(m map[string]*openapi3.Operation) []string
- func SortedParameterKeys(dict map[string]*openapi3.ParameterRef) []string
- func SortedPathsKeys(m openapi3.Paths) []string
- func SortedRequestBodyKeys(dict map[string]*openapi3.RequestBodyRef) []string
- func SortedResponsesKeys(m openapi3.Responses) []string
- func SortedSchemaKeys(m map[string]*openapi3.SchemaRef) []string
- func SortedStringKeys(dict map[string]string) []string
- func StringInArray(str string, sl []string) bool
- func StringToGoComment(in string) string
- func ToCamelCase(str string) string
- func UppercaseFirstCharacter(str string) string
- type Imports
- type ImportsSet
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LowercaseFirstCharacter ¶
LowercaseFirstCharacter returns copy of str with first char lowercase. With respect to Unicode.
func SchemaHasAdditionalProperties ¶
SchemaHasAdditionalProperties returns true if schema can or do contain additional properties.
func SortedContentKeys ¶
SortedContentKeys returns Content map keys in sorted order.
func SortedOperationsKeys ¶
SortedOperationsKeys returns Operation map keys in sorted order.
func SortedParameterKeys ¶
func SortedParameterKeys(dict map[string]*openapi3.ParameterRef) []string
SortedParameterKeys returns ParameterRef map keys in sorted order.
func SortedPathsKeys ¶
SortedPathsKeys returns Paths map keys in sorted order.
func SortedRequestBodyKeys ¶
func SortedRequestBodyKeys(dict map[string]*openapi3.RequestBodyRef) []string
SortedRequestBodyKeys returns RequestBodyRef map keys in sorted order.
func SortedResponsesKeys ¶
SortedResponsesKeys returns Responses map keys in sorted order.
func SortedSchemaKeys ¶
SortedSchemaKeys returns SchemaRef map keys in sorted order.
func SortedStringKeys ¶
SortedStringKeys returns strings map keys in sorted order.
func StringInArray ¶
StringInArray returns true if provided string is in provided slice.
func StringToGoComment ¶
StringToGoComment renders a possible multi-line string as a valid Go-Comment. Each line is prefixed as a comment.
func ToCamelCase ¶
ToCamelCase converts query-arg style strings to CamelCase.
We will use `., -, +, :, ;, _, ~, ' ', (, ), {, }, [, ]` as valid delimiters for words.
Example ¶
s := "word.word-word+word:word;word_word~word word(word)word{word}[word]" converted := ToCamelCase(s) fmt.Println(converted)
Output: WordWordWordWordWordWordWordWordWordWordWordWordWord
func UppercaseFirstCharacter ¶
UppercaseFirstCharacter returns copy of str with first char uppercase. With respect to Unicode.
Types ¶
type ImportsSet ¶
func NewImportsSet ¶
func NewImportsSet() ImportsSet
func (ImportsSet) External ¶
func (i ImportsSet) External() Imports
func (ImportsSet) Local ¶
func (i ImportsSet) Local() Imports
func (ImportsSet) Sort ¶
func (i ImportsSet) Sort()
func (ImportsSet) Std ¶
func (i ImportsSet) Std() Imports