schematyper
schematyper copied to clipboard
Duplicated identifier names if the schema contains special character
input example:
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"name$": {
"type": "string"
},
"name-": {
"type": "string"
},
"schema": {
"type": "string"
},
"$schema": {
"type": "string"
}
}
}
the output result:
type Test struct {
Name string `json:"name,omitempty"`
Name string `json:"name$,omitempty"`
Name string `json:"name-,omitempty"`
Schema string `json:"$schema,omitempty"`
Schema string `json:"schema,omitempty"`
}