-
Notifications
You must be signed in to change notification settings - Fork 460
Open
Description
Description
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 ID
parameters:
- in: path
name: userId
schema:
type: integer
required: true
description: Numeric ID of the user to getSchema 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.
npx @redocly/cli lint doc/apidoc/schema_swagger_json.json 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 definition
jaynetics
Metadata
Metadata
Assignees
Labels
No labels