You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I was navigating through dndbeyond.com to record API requests and there are many structural errors when importing the resulting JSON into Swagger Editor similar to below:
Structural error at paths./font_picker.post.requestBody.content.application/json.schema.properties.organization_id.type
should be equal to one of the allowed values
allowedValues: array, boolean, integer, number, object, string
As you can see null is not the same as 'null'. When submitting a value of null it's probably not possible to determine what the type signature should be. But rather than a string of 'null' it should probably just be an empty string to or one of the other allowed values to adhere to the spec.
The text was updated successfully, but these errors were encountered:
Hi @jziggas, have you tried importing the spec into https://editor-next.swagger.io/ ? This error may be because the editor you're using isn't compatible with the latest OpenAPI 3.1 standard.
I believe type: 'null' is correct here (OpenAPI 3.1, JSON Schema 2020-12), it was introduced in 3.1, but doesn't exist in <=3.0.
Oh interesting, thank you. I was not aware of that URL and was using the standard https://editor.swagger.io/ one. There is only one error when pasting into that next gen editor (well I guess it is more than one considering the spaces in the key names):
Hello, I was navigating through dndbeyond.com to record API requests and there are many structural errors when importing the resulting JSON into Swagger Editor similar to below:
This particular request looks like:
The resulting OpenAPI request body looks like:
As you can see
null
is not the same as'null'
. When submitting a value ofnull
it's probably not possible to determine what the type signature should be. But rather than a string of'null'
it should probably just be an empty string to or one of the other allowed values to adhere to the spec.The text was updated successfully, but these errors were encountered: