diff --git a/__tests__/commands/openapi/__snapshots__/inspect.test.ts.snap b/__tests__/commands/openapi/__snapshots__/inspect.test.ts.snap index ffd23ec8a..d3a918d17 100644 --- a/__tests__/commands/openapi/__snapshots__/inspect.test.ts.snap +++ b/__tests__/commands/openapi/__snapshots__/inspect.test.ts.snap @@ -9,6 +9,8 @@ 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 @@ -16,14 +18,19 @@ polymorphism: · #/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 @@ -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 @@ -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" `; @@ -93,13 +103,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" + · #/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`] = ` @@ -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. @@ -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. @@ -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 diff --git a/__tests__/helpers/github-workflow-schema.json b/__tests__/helpers/github-workflow-schema.json index b0a731620..1a274d5ab 100644 --- a/__tests__/helpers/github-workflow-schema.json +++ b/__tests__/helpers/github-workflow-schema.json @@ -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", diff --git a/package-lock.json b/package-lock.json index 97b4e2a0a..1e5fb316e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,8 +25,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", @@ -48,7 +48,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", @@ -133,9 +133,9 @@ } }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.9.3", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.9.3.tgz", - "integrity": "sha512-60vepv88RwcJtSHrD6MjIL6Ta3SOYbgfnkHb+ppAVK+o9mXprRtulx7VlRl3lN3bbvysAfCS7WMVfhUYemB0IQ==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-12.0.1.tgz", + "integrity": "sha512-D3n3T19ly/RYyEvsrqKa/cSAlzQF8KXj1o0XLTI+9GKnJvdHT3WW50yZYCf+4JU7+pLlhXZVV1q1AJ0SPN/pmw==", "license": "MIT", "dependencies": { "@jsdevtools/ono": "^7.1.3", @@ -3152,19 +3152,19 @@ "license": "MIT" }, "node_modules/@readme/oas-examples": { - "version": "5.19.2", - "resolved": "https://registry.npmjs.org/@readme/oas-examples/-/oas-examples-5.19.2.tgz", - "integrity": "sha512-KliSfKVJjJC0473ObgFu5MzqpJuI9SlKq8ewEgOoAe3wQpSVBaGA6c3qGFEa9mRRRz51y5p0Q3ZLfjuQbD8QnQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@readme/oas-examples/-/oas-examples-6.0.0.tgz", + "integrity": "sha512-SzrZy8Sn/0w0h6JCWW9IWwaUddm8pljhZ73eIqpCp9eHnxGuBuO+r1K31w8bNNnJ6tmWxtUaor8IdciwelB6zg==", "dev": true, "license": "MIT" }, "node_modules/@readme/openapi-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@readme/openapi-parser/-/openapi-parser-3.0.1.tgz", - "integrity": "sha512-U0Hn3bJRs8ZWn6cylNxLsieJjr5liibzn9JDuWNVvBILK5geEtJDS7S2vMbNViufGGLu08q1dvsbbYIZCSkBzw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@readme/openapi-parser/-/openapi-parser-4.0.0.tgz", + "integrity": "sha512-TYeEjSYGCmaBjvQA+BcQYjfv4k+02oychlRHShj/3Iwm2s+a+isENeJU/HPgxIZqtKuP2JZ0gJTvBXo9ci4NEg==", "license": "MIT", "dependencies": { - "@apidevtools/json-schema-ref-parser": "^11.9.2", + "@apidevtools/json-schema-ref-parser": "^12.0.1", "@readme/better-ajv-errors": "^2.3.2", "@readme/openapi-schemas": "^3.1.0", "@types/json-schema": "^7.0.15", @@ -13823,12 +13823,12 @@ "license": "MIT" }, "node_modules/oas": { - "version": "26.0.2", - "resolved": "https://registry.npmjs.org/oas/-/oas-26.0.2.tgz", - "integrity": "sha512-v2Je6lWjliSukRlRKy22OjZyq4KhW8GPTEDHJ7mSN7CA/V2HO2ioiNecvWKcpMn/KrHda/igmpuCXqaan3OvoQ==", + "version": "27.0.0", + "resolved": "https://registry.npmjs.org/oas/-/oas-27.0.0.tgz", + "integrity": "sha512-5ibKLmhWytJhi/ZIPUfFu3aSTH4LSE4zLAe/uWUSWbI6ijz/BqMKgnelpwPffJDAooWcJ0pP7KjskB/MNDhCGg==", "license": "MIT", "dependencies": { - "@readme/openapi-parser": "^3.0.1", + "@readme/openapi-parser": "^4.0.0", "@types/json-schema": "^7.0.11", "json-schema-merge-allof": "^0.8.1", "jsonpath-plus": "^10.0.0", @@ -13866,12 +13866,12 @@ } }, "node_modules/oas-normalize": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/oas-normalize/-/oas-normalize-13.1.2.tgz", - "integrity": "sha512-FXi+1I2MwPZWn4ERMpjJghMBu0qhgDHt0F2HINJyqksIpHJyIO5KMD+8/pUnF3H8iH36ZbszEi35YSllScajUA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/oas-normalize/-/oas-normalize-14.0.0.tgz", + "integrity": "sha512-nvHxGcDcUXpZgepHJSS0ewQet1a27IffKv+iJM7qKievN7denWzDFZPDy7izmcLGdImb2WAt3tRAlJN37snWFA==", "license": "MIT", "dependencies": { - "@readme/openapi-parser": "^3.0.1", + "@readme/openapi-parser": "^4.0.0", "@readme/postman-to-openapi": "^4.1.0", "js-yaml": "^4.1.0", "openapi-types": "^12.1.3", @@ -18597,9 +18597,9 @@ } }, "node_modules/vite-node/node_modules/vite": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.4.tgz", - "integrity": "sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==", + "version": "6.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz", + "integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==", "dev": true, "license": "MIT", "dependencies": { @@ -18791,9 +18791,9 @@ } }, "node_modules/vitest/node_modules/vite": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.4.tgz", - "integrity": "sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==", + "version": "6.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz", + "integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 48a5b6a6e..f36c5cee3 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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",