[BUG] When running extractor for OAS version 3 Json it is converting boolean values to string
See original GitHub issueRelease version
4.0.3
Describe the bug
When running extractor pipeline with option OAS v3 json, specification.json generated will convert the boolean values to string which causing linting failed.
Expected behavior
boolean values should not converted to string.
example: expected result “required” : true
generated specification result: “required” : “true”
Actual behavior
generated specification result: “required” : “true” `“delete”: { “tags”: [ “OptIn” ], “summary”: “Delete Opt-In”, “description”: “Delete Opt-In status for a user. Resets them to not opted in.”, “operationId”: “delete-users-userid”, “parameters”: [ { “name”: “userId”, “in”: “path”, **
“required”: “true”,
** “schema”: { “type”: “string” } } ], “responses”: { “200”: { “description”: “Deleted Opt-In Data”, “content”: { “application/json”: { “schema”: { “$ref”: “#/components/schemas/OptInData” }, “example”: { “userId”: “string” } } } },`
Reproduction Steps
Run extractor pipeline with the generator option OpenAPIV3Json and analyse the specification.json.
83:11 error path-params Path parameter "userId" must have "required" property that is set to "true". paths./AccountLinks/{userId}/accounts/{accountNumber}.get.parameters[0] 87:25 error oas3-schema "required" property must be equal to one of the allowed values. paths./AccountLinks/{userId}/accounts/{accountNumber}.get.parameters[0].required 87:25 error oas3-schema "required" property type must be boolean. paths./AccountLinks/{userId}/accounts/{accountNumber}.get.parameters[0].required
Issue Analytics
- State:
- Created 6 months ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
@guythetechie , I have edited in the comment with the json.
Fix pushed in latest release.