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
Path parameters are singleton resources, and have the schema of required: true to specify their _require_ment
paths:
/users/{userId}:
get:
summary: Get a user by IDparameters:
- in: pathname: userIdschema:
type: integerrequired: truedescription: Numeric ID of the user to get
Schema response components and request bodies use the required: [] syntax to specify which of the fields in their object structure must be provided.
Assertion
The popular redocly CLI replaced the depreacted swagger cli and can be used to lint the produced swagger 2.
Once there are far fewer errors generated in the swagger 2 file, the errors which are important for user action will be far easier to see, and act upon.
Fix
When generating swagger from ApiPie remove the required: true generated output from the JSON for request bodies and response bodies, but preserve the array definition
The text was updated successfully, but these errors were encountered:
it seems to be as easy as removing this line, but i'm a bit unsure what is right here because the official json schema of 2.0 says a boolean is valid...
Description
Path parameters are singleton resources, and have the schema of
required: true
to specify their _require_mentSchema response components and request bodies use the
required: []
syntax to specify which of the fields in their object structure must be provided.Assertion
The popular redocly CLI replaced the depreacted swagger cli and can be used to lint the produced swagger 2.
Benefit
Once there are far fewer errors generated in the swagger 2 file, the errors which are important for user action will be far easier to see, and act upon.
Fix
When generating swagger from ApiPie remove the
required: true
generated output from the JSON for request bodies and response bodies, but preserve the array definitionThe text was updated successfully, but these errors were encountered: