A language for describing resource-oriented APIs & turning them into Swagger or resource diagrams. Oriented around the concepts we want to expose in the APIs.
Apache License 2.0
23
stars
7
forks
source link
Put `format` attribute under the `items` attribute for array properties #42
The Field API defines an fieldIDs array field for the bulk disable action. This generated swagger that looks like this:
fieldIDs:
description: IDs of Fields to disable.
format: int64
items:
type: integer
example: 'Link to Audience::Field resource(s) via id(s)'
type: array
This is slightly incorrect, as the format: int64 line should be underneath the items attribute, as the int64 format applies to the integer items. The above swagger generates a Java class with fieldIDs as a list of Integers, rather than Longs as is desired.
This should be fixed by changing reslang to generate swagger that has the format underneath the items attribute for array properties. Here is what the correct swagger should look like:
fieldIDs:
description: IDs of Fields to disable.
items:
type: integer
format: int64
example: 'Link to Audience::Field resource(s) via id(s)'
type: array
The Field API defines an fieldIDs array field for the bulk disable action. This generated swagger that looks like this:
This is slightly incorrect, as the
format: int64
line should be underneath theitems
attribute, as theint64
format applies to theinteger
items. The above swagger generates a Java class withfieldIDs
as a list of Integers, rather than Longs as is desired.This should be fixed by changing reslang to generate swagger that has the
format
underneath theitems
attribute for array properties. Here is what the correct swagger should look like: