fix(swagger): quote keys named "y"

The YAML parser used by the go-openapi libraries treats an unquoted y as
a boolean key, which will lead to a difficult-to-understand parser
error:

types don't match expect map key string or int got: bool

See also https://yaml.org/type/bool.html.
pull/12129/head
Mark Rushakoff 2019-02-21 21:59:46 -08:00 committed by Alirie Gray
parent 83ba3e9c22
commit 380cc2285c
1 changed files with 3 additions and 3 deletions

View File

@ -5819,7 +5819,7 @@ components:
properties:
x:
$ref: '#/components/schemas/Axis'
y:
"y": # Quoted to prevent YAML parser from interpreting y as shorthand for true.
$ref: '#/components/schemas/Axis'
y2:
$ref: '#/components/schemas/Axis'
@ -6051,7 +6051,7 @@ components:
x:
type: integer
format: int32
y:
"y": # Quoted to prevent YAML parser from interpreting y as shorthand for true.
type: integer
format: int32
w:
@ -6099,7 +6099,7 @@ components:
x:
type: integer
format: int32
y:
"y": # Quoted to prevent YAML parser from interpreting y as shorthand for true.
type: integer
format: int32
w: