Skip to content

chore(deps): upgrading openapi-related tooling #1212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions __tests__/commands/openapi/__snapshots__/inspect.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,28 @@ polymorphism:
· #/components/schemas/error_APIKEY_EMPTY
· #/components/schemas/error_APIKEY_MISMATCH
· #/components/schemas/error_APIKEY_NOTFOUND
· #/components/schemas/error_API_ACCESS_REVOKED
· #/components/schemas/error_API_ACCESS_UNAVAILABLE
· #/components/schemas/error_APPLY_INVALID_EMAIL
· #/components/schemas/error_APPLY_INVALID_JOB
· #/components/schemas/error_APPLY_INVALID_NAME
· #/components/schemas/error_CATEGORY_INVALID
· #/components/schemas/error_CATEGORY_NOTFOUND
· #/components/schemas/error_CHANGELOG_INVALID
· #/components/schemas/error_CHANGELOG_NOTFOUND
· #/components/schemas/error_CUSTOMBLOCK_NOTFOUND
· #/components/schemas/error_CUSTOMPAGE_INVALID
· #/components/schemas/error_CUSTOMPAGE_NOTFOUND
· #/components/schemas/error_DOC_INVALID
· #/components/schemas/error_DOC_NOTFOUND
· #/components/schemas/error_ENDPOINT_NOTFOUND
· #/components/schemas/error_INTERNAL_ERROR
· #/components/schemas/error_OWLBOT_INVALID
· #/components/schemas/error_OWLBOT_NOT_ENABLED
· #/components/schemas/error_OWLBOT_NOT_ENTERPRISE
· #/components/schemas/error_PROJECT_NEEDSSTAGING
· #/components/schemas/error_PROJECT_NOTFOUND
· #/components/schemas/error_PROJECT_NOT_CHILD
· #/components/schemas/error_RATE_LIMITED
· #/components/schemas/error_REGISTRY_INVALID
· #/components/schemas/error_REGISTRY_NOTFOUND
Expand All @@ -32,12 +39,14 @@ polymorphism:
· #/components/schemas/error_SPEC_ID_INVALID
· #/components/schemas/error_SPEC_INVALID
· #/components/schemas/error_SPEC_INVALID_SCHEMA
· #/components/schemas/error_SPEC_INVALID_SUPERHUB
· #/components/schemas/error_SPEC_NOTFOUND
· #/components/schemas/error_SPEC_TIMEOUT
· #/components/schemas/error_SPEC_VERSION_NOTFOUND
· #/components/schemas/error_UNEXPECTED_ERROR
· #/components/schemas/error_VERSION_CANT_DEMOTE_STABLE
· #/components/schemas/error_VERSION_CANT_REMOVE_STABLE
· #/components/schemas/error_VERSION_CONFLICTING_FLAGS
· #/components/schemas/error_VERSION_DUPLICATE
· #/components/schemas/error_VERSION_EMPTY
· #/components/schemas/error_VERSION_FORK_EMPTY
Expand All @@ -46,6 +55,7 @@ polymorphism:
· #/components/schemas/error_VERSION_NOTFOUND
· #/paths/~1api-specification/post/responses/400/content/application~1json/schema
· #/paths/~1api-specification~1{id}/put/responses/400/content/application~1json/schema
· #/paths/~1api-validation/post/responses/400/content/application~1json/schema
· #/paths/~1categories/post/requestBody/content/application~1json/schema
· #/paths/~1version/post/responses/400/content/application~1json/schema"
`;
Expand Down Expand Up @@ -93,13 +103,8 @@ additionalProperties:
· #/components/schemas/ParameterizedHeader/properties/parameters/additionalProperties

circularRefs:
· #/components/schemas/BodyPart/properties/parent
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These snapshots got updated because of the circular reference performance change in @apidevtools/json-schema-ref-parser.

· #/components/schemas/MultiPart/properties/bodyParts/items
· #/components/schemas/MultiPart/properties/parent
· #/components/schemas/ZoneOffset/properties/rules
· #/components/schemas/ZoneOffsetTransition/properties/offsetAfter
· #/components/schemas/ZoneOffsetTransition/properties/offsetBefore
· #/components/schemas/ZoneRules/properties/transitions/items"
· #/components/schemas/ZoneOffset/properties/rules"
`;

exports[`rdme openapi inspect > feature reports > should generate a report for '@readme/oas-examples/3.0/json/schema-…' (w/ [ 'additionalProperties', …(2) ]) 1`] = `
Expand All @@ -119,13 +124,8 @@ additionalProperties:
· #/components/schemas/ParameterizedHeader/properties/parameters/additionalProperties

circularRefs:
· #/components/schemas/BodyPart/properties/parent
· #/components/schemas/MultiPart/properties/bodyParts/items
· #/components/schemas/MultiPart/properties/parent
· #/components/schemas/ZoneOffset/properties/rules
· #/components/schemas/ZoneOffsetTransition/properties/offsetAfter
· #/components/schemas/ZoneOffsetTransition/properties/offsetBefore
· #/components/schemas/ZoneRules/properties/transitions/items

x-default: You do not use this.
x-readme.code-samples: You do not use this.
Expand All @@ -138,13 +138,8 @@ x-readme.samples-languages: You do not use this.]
exports[`rdme openapi inspect > feature reports > should generate a report for '@readme/oas-examples/3.0/json/schema-…' (w/ [ 'circularRefs', 'readme' ]) 1`] = `
[SoftError:
circularRefs:
· #/components/schemas/BodyPart/properties/parent
· #/components/schemas/MultiPart/properties/bodyParts/items
· #/components/schemas/MultiPart/properties/parent
· #/components/schemas/ZoneOffset/properties/rules
· #/components/schemas/ZoneOffsetTransition/properties/offsetAfter
· #/components/schemas/ZoneOffsetTransition/properties/offsetBefore
· #/components/schemas/ZoneRules/properties/transitions/items

x-default: You do not use this.
x-readme.code-samples: You do not use this.
Expand Down Expand Up @@ -288,8 +283,8 @@ exports[`rdme openapi inspect > full reports > should generate a report for @rea
exports[`rdme openapi inspect > full reports > should generate a report for @readme/oas-examples/3.0/json/readme.json 1`] = `
"Here are some interesting things we found in your API definition. 🕵️

· You are using 2 media types throughout your API: application/json and multipart/form-data
· You have a total of 36 operations in your API.
· You are using 3 media types throughout your API: application/json, multipart/form-data, and text/event-stream
· You have a total of 39 operations in your API.
· You are using a single security type throughout your API: http

🌲 OpenAPI Features
Expand Down
3 changes: 1 addition & 2 deletions __tests__/helpers/github-workflow-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,7 @@
"types": {
"$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onevent_nametypes",
"description": "Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.\nYou can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.",
"type": "array",
"minItems": 1
"oneOf": [{ "type": "array", "minItems": 1 }, { "type": "string" }]
},
"working-directory": {
"$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun",
Expand Down
54 changes: 27 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"ignore": "^7.0.0",
"js-yaml": "^4.1.0",
"mime-types": "^3.0.1",
"oas": "^26.0.1",
"oas-normalize": "^13.0.1",
"oas": "^27.0.0",
"oas-normalize": "^14.0.0",
"ora": "^8.1.1",
"prompts": "^2.4.2",
"semver": "^7.5.3",
Expand All @@ -77,7 +77,7 @@
"@oclif/test": "^4.1.0",
"@readme/better-ajv-errors": "^2.3.2",
"@readme/eslint-config": "^14.3.0",
"@readme/oas-examples": "^5.19.1",
"@readme/oas-examples": "^6.0.0",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^16.0.0",
Expand Down
Loading