From e9e0a31f133968f827cb6cf7f21d744844cbaca4 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 8 Nov 2024 14:30:32 +0100 Subject: [PATCH 01/30] schema test: error if schema doesn't validate Error diagnostics if pass test case fails --- tests/v1.0/schema.test.mjs | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/tests/v1.0/schema.test.mjs b/tests/v1.0/schema.test.mjs index f52c424..43fa9db 100644 --- a/tests/v1.0/schema.test.mjs +++ b/tests/v1.0/schema.test.mjs @@ -1,6 +1,9 @@ import { readdirSync, readFileSync } from "node:fs"; import YAML from "yaml"; -import { validate, setMetaSchemaOutputFormat } from "@hyperjump/json-schema/draft-2020-12"; +import { + validate, + setMetaSchemaOutputFormat, +} from "@hyperjump/json-schema/draft-2020-12"; import { BASIC } from "@hyperjump/json-schema/experimental"; import { describe, test, expect } from "vitest"; @@ -9,15 +12,18 @@ import { addMediaTypePlugin } from "@hyperjump/browser"; import { buildSchemaDocument } from "@hyperjump/json-schema/experimental"; addMediaTypePlugin("application/schema+yaml", { - parse: async (response) => { - const contentType = contentTypeParser.parse(response.headers.get("content-type") ?? ""); - const contextDialectId = contentType.parameters.schema ?? contentType.parameters.profile; - - const foo = YAML.parse(await response.text()); - return buildSchemaDocument(foo, response.url, contextDialectId); - }, - fileMatcher: (path) => path.endsWith(".yaml") - }); + parse: async (response) => { + const contentType = contentTypeParser.parse( + response.headers.get("content-type") ?? "", + ); + const contextDialectId = + contentType.parameters.schema ?? contentType.parameters.profile; + + const foo = YAML.parse(await response.text()); + return buildSchemaDocument(foo, response.url, contextDialectId); + }, + fileMatcher: (path) => path.endsWith(".yaml"), +}); const parseYamlFromFile = (filePath) => { const schemaYaml = readFileSync(filePath, "utf8"); @@ -26,7 +32,13 @@ const parseYamlFromFile = (filePath) => { setMetaSchemaOutputFormat(BASIC); -const validateOverlay = await validate("./schemas/v1.0/schema.yaml"); +let validateOverlay; +try { + validateOverlay = await validate("./schemas/v1.0/schema.yaml"); +} catch (error) { + console.error(error.output); + process.exit(1); +} describe("v1.0", () => { describe("Pass", () => { @@ -36,7 +48,7 @@ describe("v1.0", () => { test(entry.name, () => { const instance = parseYamlFromFile(`./tests/v1.0/pass/${entry.name}`); const output = validateOverlay(instance, BASIC); - expect(output.valid).to.equal(true); + expect(output).to.deep.equal({ valid: true }); }); }); }); From 80b9c87f730579ee6962b6700cf9f0a1cfa9a99e Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 12 Nov 2024 11:40:14 +0100 Subject: [PATCH 02/30] Bump schema-validator --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index a8828c5..fc1063a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "yargs": "^17.7.2" }, "devDependencies": { - "@hyperjump/json-schema": "^1.9.8", + "@hyperjump/json-schema": "^1.9.9", "c8": "^10.1.2", "markdownlint-cli": "^0.41.0", "mdv": "^1.3.4", @@ -493,9 +493,9 @@ } }, "node_modules/@hyperjump/json-schema": { - "version": "1.9.8", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.9.8.tgz", - "integrity": "sha512-qmdMpYn8CpYR7z3fxkL6fgkDvMaAEFKtmYu3XDi6hWW2BT+rLl7T4Y4QpafEIR4wkcmCxcJf9me9FmxKpv3i9g==", + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.9.9.tgz", + "integrity": "sha512-+3aN6GaJvRzQ3H5JxO4wIuYiw6/iQLJ260DvtlaY5DDK0ti4uPmmEg56ijGsyYABj00GVTxyOkFO1BH9AN707w==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 2cab8cc..d4434f6 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "yargs": "^17.7.2" }, "devDependencies": { - "@hyperjump/json-schema": "^1.9.8", + "@hyperjump/json-schema": "^1.9.9", "c8": "^10.1.2", "markdownlint-cli": "^0.41.0", "mdv": "^1.3.4", From b97a146f32cfe0e15facb001b1bfd92d5235f296 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 12 Nov 2024 12:51:04 +0100 Subject: [PATCH 03/30] Measure schema test coverage --- package.json | 2 +- scripts/schema-test-coverage.mjs | 132 +++++++++++++++++++++++++++++++ scripts/schema-test-coverage.sh | 18 +++++ 3 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 scripts/schema-test-coverage.mjs create mode 100644 scripts/schema-test-coverage.sh diff --git a/package.json b/package.json index d4434f6..f7d9471 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,6 @@ "scripts": { "build": "bash ./scripts/md2html/build.sh", "format-markdown": "bash ./scripts/format-markdown.sh ./versions/*.md", - "test": "c8 --100 vitest --watch=false" + "test": "c8 --100 vitest --watch=false && bash scripts/schema-test-coverage.sh" } } diff --git a/scripts/schema-test-coverage.mjs b/scripts/schema-test-coverage.mjs new file mode 100644 index 0000000..9953a5c --- /dev/null +++ b/scripts/schema-test-coverage.mjs @@ -0,0 +1,132 @@ +import { readdir, readFile } from "node:fs/promises"; +import YAML from "yaml"; +import { join } from "node:path"; +import { argv } from "node:process"; +import "@hyperjump/json-schema/draft-2020-12"; +import "@hyperjump/json-schema/draft-04"; +import { + compile, + getSchema, + interpret, + Validation, + BASIC, +} from "@hyperjump/json-schema/experimental"; +import * as Instance from "@hyperjump/json-schema/instance/experimental"; + +/** + * @import { AST } from "@hyperjump/json-schema/experimental" + * @import { Json } from "@hyperjump/json-schema" + */ + +import contentTypeParser from "content-type"; +import { addMediaTypePlugin } from "@hyperjump/browser"; +import { buildSchemaDocument } from "@hyperjump/json-schema/experimental"; + +addMediaTypePlugin("application/schema+yaml", { + parse: async (response) => { + const contentType = contentTypeParser.parse( + response.headers.get("content-type") ?? "", + ); + const contextDialectId = + contentType.parameters.schema ?? contentType.parameters.profile; + + const foo = YAML.parse(await response.text()); + return buildSchemaDocument(foo, response.url, contextDialectId); + }, + fileMatcher: (path) => path.endsWith(".yaml"), +}); + +/** @type (testDirectory: string) => AsyncGenerator<[string,Json]> */ +const tests = async function* (testDirectory) { + for (const file of await readdir(testDirectory, { + recursive: true, + withFileTypes: true, + })) { + if (!file.isFile() || !file.name.endsWith(".yaml")) { + continue; + } + + const testPath = join(file.parentPath, file.name); + const testJson = await readFile(testPath, "utf8"); + + yield [testPath, YAML.parse(testJson)]; + } +}; + +/** @type (testDirectory: string) => Promise */ +const runTests = async (testDirectory) => { + for await (const [name, test] of tests(testDirectory)) { + const instance = Instance.fromJs(test); + + const result = interpret(compiled, instance, BASIC); + + if (!result.valid) { + console.log("Failed:", name, result.errors); + } + } +}; + +/** @type (ast: AST) => string[] */ +const keywordLocations = (ast) => { + /** @type string[] */ + const locations = []; + for (const schemaLocation in ast) { + if (schemaLocation === "metaData") { + continue; + } + + if (Array.isArray(ast[schemaLocation])) { + for (const keyword of ast[schemaLocation]) { + if (Array.isArray(keyword)) { + locations.push(keyword[1]); + } + } + } + } + + return locations; +}; + +/////////////////////////////////////////////////////////////////////////////// + +const schema = await getSchema(argv[2]); +const compiled = await compile(schema); + +/** @type Set */ +const visitedLocations = new Set(); +const baseInterpret = Validation.interpret; +Validation.interpret = (url, instance, ast, dynamicAnchors, quiet) => { + if (Array.isArray(ast[url])) { + for (const keywordNode of ast[url]) { + if (Array.isArray(keywordNode)) { + visitedLocations.add(keywordNode[1]); + } + } + } + return baseInterpret(url, instance, ast, dynamicAnchors, quiet); +}; + +await runTests(argv[3]); +Validation.interpret = baseInterpret; + +// console.log("Covered:", visitedLocations); + +const allKeywords = keywordLocations(compiled.ast); +const notCovered = allKeywords.filter( + (location) => !visitedLocations.has(location), +); +if (notCovered.length > 0) { + console.log("NOT Covered:", notCovered.length, "of", allKeywords.length); + const maxNotCovered = 20; + const firstNotCovered = notCovered.slice(0, maxNotCovered); + if (notCovered.length > maxNotCovered) firstNotCovered.push("..."); + console.log(firstNotCovered); +} + +console.log( + "Covered:", + visitedLocations.size, + "of", + allKeywords.length, + "(" + Math.floor((visitedLocations.size / allKeywords.length) * 100) + "%)", +); diff --git a/scripts/schema-test-coverage.sh b/scripts/schema-test-coverage.sh new file mode 100644 index 0000000..ee3acef --- /dev/null +++ b/scripts/schema-test-coverage.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# Author: @ralfhandl + +# Run this script from the root of the repo + +echo +echo "Schema Test Coverage" +echo + +for schemaDir in schemas/v* ; do + version=$(basename "$schemaDir") + echo $version + + node scripts/schema-test-coverage.mjs $schemaDir/schema.yaml tests/$version/pass + + echo +done From aca2b4411f340458a793bf849965f8ceaf69e461 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 12 Nov 2024 12:55:41 +0100 Subject: [PATCH 04/30] make executable --- scripts/schema-test-coverage.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/schema-test-coverage.sh diff --git a/scripts/schema-test-coverage.sh b/scripts/schema-test-coverage.sh old mode 100644 new mode 100755 From 6d0bc24ada9c80fb7a9ffca8f720ac7832839cc2 Mon Sep 17 00:00:00 2001 From: Jeremy Fiel <32110157+jeremyfiel@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:35:57 +0000 Subject: [PATCH 05/30] feat(test): add schema tests and schema * fixup `target` json path * remove constraint for no update with remove * update schema tests for update and remove definition --- schemas/v1.0/readme.md | 36 +++++++++++ schemas/v1.0/schema.yaml | 60 ++++++++++++++++++- .../fail/actions-invalid-description.yaml | 7 +++ tests/v1.0/fail/actions-invalid-target.yaml | 7 +++ tests/v1.0/fail/actions-minimal.yaml | 5 ++ tests/v1.0/fail/actions-missing-target.yaml | 6 ++ tests/v1.0/fail/actions-missing.yaml | 5 ++ tests/v1.0/fail/actions-not-unique.yaml | 9 +++ tests/v1.0/fail/extends-invalid-type.yaml | 7 +++ tests/v1.0/fail/info-missing-title.yaml | 5 ++ tests/v1.0/fail/info-missing-version.yaml | 5 ++ tests/v1.0/fail/invalid-overlay-version.yaml | 6 ++ ...ns-array-modification-example-remove.yaml} | 2 + ...ns-array-modification-example-update.yaml} | 0 tests/v1.0/pass/actions-description.yaml | 7 +++ tests/v1.0/pass/actions-extensions.yaml | 7 +++ ...> actions-structured-overlay-example.yaml} | 3 +- ... => actions-targeted-overlay-example.yaml} | 0 ...ample.yaml => actions-traits-example.yaml} | 0 .../v1.0/pass/actions-update-with-remove.yaml | 12 ++++ ... => actions-wildcard-overlay-example.yaml} | 0 tests/v1.0/pass/info-extensions.yaml | 7 +++ tests/v1.0/pass/root-extensions.yaml | 7 +++ 23 files changed, 201 insertions(+), 2 deletions(-) create mode 100644 schemas/v1.0/readme.md create mode 100644 tests/v1.0/fail/actions-invalid-description.yaml create mode 100644 tests/v1.0/fail/actions-invalid-target.yaml create mode 100644 tests/v1.0/fail/actions-minimal.yaml create mode 100644 tests/v1.0/fail/actions-missing-target.yaml create mode 100644 tests/v1.0/fail/actions-missing.yaml create mode 100644 tests/v1.0/fail/actions-not-unique.yaml create mode 100644 tests/v1.0/fail/extends-invalid-type.yaml create mode 100644 tests/v1.0/fail/info-missing-title.yaml create mode 100644 tests/v1.0/fail/info-missing-version.yaml create mode 100644 tests/v1.0/fail/invalid-overlay-version.yaml rename tests/v1.0/pass/{array-modification-example-remove.yaml => actions-array-modification-example-remove.yaml} (82%) rename tests/v1.0/pass/{array-modification-example-update.yaml => actions-array-modification-example-update.yaml} (100%) create mode 100644 tests/v1.0/pass/actions-description.yaml create mode 100644 tests/v1.0/pass/actions-extensions.yaml rename tests/v1.0/pass/{structured-overlay-example.yaml => actions-structured-overlay-example.yaml} (92%) rename tests/v1.0/pass/{targeted-overlay-example.yaml => actions-targeted-overlay-example.yaml} (100%) rename tests/v1.0/pass/{traits-example.yaml => actions-traits-example.yaml} (100%) create mode 100644 tests/v1.0/pass/actions-update-with-remove.yaml rename tests/v1.0/pass/{wildcard-overlay-example.yaml => actions-wildcard-overlay-example.yaml} (100%) create mode 100644 tests/v1.0/pass/info-extensions.yaml create mode 100644 tests/v1.0/pass/root-extensions.yaml diff --git a/schemas/v1.0/readme.md b/schemas/v1.0/readme.md new file mode 100644 index 0000000..6a99c33 --- /dev/null +++ b/schemas/v1.0/readme.md @@ -0,0 +1,36 @@ +# OpenAPI Overlay 1.0.x JSON Schema + +Here you can find the JSON Schema for validating Overlays of versions 1.0.x. + +As a reminder, the JSON Schema is not the source of truth for the Specification. +In cases of conflicts between the Specification itself and the JSON Schema, the +Specification wins. Also, some Specification constraints cannot be represented +with the JSON Schema so it's highly recommended to employ other methods to +ensure compliance. + +The iteration version of the JSON Schema can be found in the `$id` field. +For example, the value of `$id: https://spec.openapis.org/overlay/1.0/schema/2024-10-17` means this iteration was created on October 17, 2024. + +## Contributing + +To submit improvements to the schema, modify the `schema.yaml` and add test cases for your changes. + +The TSC will then: +- Run tests on the updated schema +- Update the iteration version +- Publish the new version + +## Tests + +The [test suite](../../tests/v1.0) is part of this package. + +```bash +npm install +npm test +``` + +You can also validate a document individually. + +```bash +node scripts/validate.mjs path/to/document/to/validate.yaml +``` \ No newline at end of file diff --git a/schemas/v1.0/schema.yaml b/schemas/v1.0/schema.yaml index 96196d5..000bfa9 100644 --- a/schemas/v1.0/schema.yaml +++ b/schemas/v1.0/schema.yaml @@ -1,5 +1,63 @@ $id: https://spec.openapis.org/overlay/1.0/schema/WORK-IN-PROGRESS $schema: https://json-schema.org/draft/2020-12/schema description: The description of Overlay v1.0.x documents - type: object +properties: + overlay: + type: string + pattern: ^1\.0\.\d+$ + info: + $ref: "#/$defs/info-object" + extends: + type: string + format: uri-reference + actions: + type: array + minItems: 1 + uniqueItems: true + items: + $ref: "#/$defs/action-object" +required: + - overlay + - info + - actions +$ref: "#/$defs/specification-extensions" +unevaluatedProperties: false +$defs: + info-object: + type: object + properties: + title: + type: string + version: + type: string + required: + - title + - version + $ref: "#/$defs/specification-extensions" + unevaluatedProperties: false + action-object: + properties: + target: + type: string + pattern: ^\$ + description: + type: string + update: + type: + - string + - boolean + - object + - array + - number + - "null" + remove: + type: boolean + default: false + required: + - target + $ref: "#/$defs/specification-extensions" + unevaluatedProperties: false + specification-extensions: + patternProperties: + ^x-: true diff --git a/tests/v1.0/fail/actions-invalid-description.yaml b/tests/v1.0/fail/actions-invalid-description.yaml new file mode 100644 index 0000000..0564531 --- /dev/null +++ b/tests/v1.0/fail/actions-invalid-description.yaml @@ -0,0 +1,7 @@ +overlay: 1.0.0 +info: + title: Actions invalid description + version: 1.0.0 +actions: + - target: '$' # Root of document + description: 10 diff --git a/tests/v1.0/fail/actions-invalid-target.yaml b/tests/v1.0/fail/actions-invalid-target.yaml new file mode 100644 index 0000000..bfff4d8 --- /dev/null +++ b/tests/v1.0/fail/actions-invalid-target.yaml @@ -0,0 +1,7 @@ +overlay: 1.0.0 +info: + title: Invalid `target`, must begin with `$` + version: 1.0.0 +actions: + - target: info.description + update: An updated description diff --git a/tests/v1.0/fail/actions-minimal.yaml b/tests/v1.0/fail/actions-minimal.yaml new file mode 100644 index 0000000..97ba931 --- /dev/null +++ b/tests/v1.0/fail/actions-minimal.yaml @@ -0,0 +1,5 @@ +overlay: 1.0.0 +info: + title: Minimal actions + version: 1.0.0 +actions: [] diff --git a/tests/v1.0/fail/actions-missing-target.yaml b/tests/v1.0/fail/actions-missing-target.yaml new file mode 100644 index 0000000..a624df7 --- /dev/null +++ b/tests/v1.0/fail/actions-missing-target.yaml @@ -0,0 +1,6 @@ +overlay: 1.0.0 +info: + title: Missing actions `target` + version: 1.0.0 +actions: + - update: my description diff --git a/tests/v1.0/fail/actions-missing.yaml b/tests/v1.0/fail/actions-missing.yaml new file mode 100644 index 0000000..078b7c6 --- /dev/null +++ b/tests/v1.0/fail/actions-missing.yaml @@ -0,0 +1,5 @@ +overlay: 1.0.0 +info: + title: Missing `actions` + version: 1.0.0 +extends: '/openapi.yaml' diff --git a/tests/v1.0/fail/actions-not-unique.yaml b/tests/v1.0/fail/actions-not-unique.yaml new file mode 100644 index 0000000..62256f8 --- /dev/null +++ b/tests/v1.0/fail/actions-not-unique.yaml @@ -0,0 +1,9 @@ +overlay: 1.0.0 +info: + title: Actions not unique + version: 1.0.0 +actions: + - target: '$.info.title' + update: 'My New title' + - target: '$.info.title' + update: 'My New title' diff --git a/tests/v1.0/fail/extends-invalid-type.yaml b/tests/v1.0/fail/extends-invalid-type.yaml new file mode 100644 index 0000000..2643a9c --- /dev/null +++ b/tests/v1.0/fail/extends-invalid-type.yaml @@ -0,0 +1,7 @@ +overlay: 1.0.0 +info: + title: Invalid `extends` type + version: 1.0.0 +extends: {} +actions: + - target: '$' # Root of document diff --git a/tests/v1.0/fail/info-missing-title.yaml b/tests/v1.0/fail/info-missing-title.yaml new file mode 100644 index 0000000..17ea86a --- /dev/null +++ b/tests/v1.0/fail/info-missing-title.yaml @@ -0,0 +1,5 @@ +overlay: 1.0.0 +info: + version: 1.0.0 +actions: + - target: '$' # Root of document diff --git a/tests/v1.0/fail/info-missing-version.yaml b/tests/v1.0/fail/info-missing-version.yaml new file mode 100644 index 0000000..24d1e62 --- /dev/null +++ b/tests/v1.0/fail/info-missing-version.yaml @@ -0,0 +1,5 @@ +overlay: 1.0.0 +info: + title: Missing Info version +actions: + - target: '$' # Root of document diff --git a/tests/v1.0/fail/invalid-overlay-version.yaml b/tests/v1.0/fail/invalid-overlay-version.yaml new file mode 100644 index 0000000..1936290 --- /dev/null +++ b/tests/v1.0/fail/invalid-overlay-version.yaml @@ -0,0 +1,6 @@ +overlay: 2 +info: + title: Invalid Overlay version + version: 1.0.0 +actions: + - target: '$' # Root of document diff --git a/tests/v1.0/pass/array-modification-example-remove.yaml b/tests/v1.0/pass/actions-array-modification-example-remove.yaml similarity index 82% rename from tests/v1.0/pass/array-modification-example-remove.yaml rename to tests/v1.0/pass/actions-array-modification-example-remove.yaml index 45781c8..8065b08 100644 --- a/tests/v1.0/pass/array-modification-example-remove.yaml +++ b/tests/v1.0/pass/actions-array-modification-example-remove.yaml @@ -7,3 +7,5 @@ actions: update: name: newParam in: query + schema: + type: string diff --git a/tests/v1.0/pass/array-modification-example-update.yaml b/tests/v1.0/pass/actions-array-modification-example-update.yaml similarity index 100% rename from tests/v1.0/pass/array-modification-example-update.yaml rename to tests/v1.0/pass/actions-array-modification-example-update.yaml diff --git a/tests/v1.0/pass/actions-description.yaml b/tests/v1.0/pass/actions-description.yaml new file mode 100644 index 0000000..a15c94e --- /dev/null +++ b/tests/v1.0/pass/actions-description.yaml @@ -0,0 +1,7 @@ +overlay: 1.0.0 +info: + title: Actions Description + version: 1.0.0 +actions: + - target: '$' # Root of document + description: this is an action description diff --git a/tests/v1.0/pass/actions-extensions.yaml b/tests/v1.0/pass/actions-extensions.yaml new file mode 100644 index 0000000..206de4b --- /dev/null +++ b/tests/v1.0/pass/actions-extensions.yaml @@ -0,0 +1,7 @@ +overlay: 1.0.0 +info: + title: Actions Extensions + version: 1.0.0 +actions: + - target: '$' # Root of document + x-myActionsExtension: {} diff --git a/tests/v1.0/pass/structured-overlay-example.yaml b/tests/v1.0/pass/actions-structured-overlay-example.yaml similarity index 92% rename from tests/v1.0/pass/structured-overlay-example.yaml rename to tests/v1.0/pass/actions-structured-overlay-example.yaml index 2f50dee..054b901 100644 --- a/tests/v1.0/pass/structured-overlay-example.yaml +++ b/tests/v1.0/pass/actions-structured-overlay-example.yaml @@ -2,6 +2,7 @@ overlay: 1.0.0 info: title: Structured Overlay version: 1.0.0 +extends: '/openapi.yaml' actions: - target: '$' # Root of document update: @@ -18,4 +19,4 @@ actions: summary: 'Retrieve a list of pets' x-rate-limit: 100 components: - tags: + tags: [] diff --git a/tests/v1.0/pass/targeted-overlay-example.yaml b/tests/v1.0/pass/actions-targeted-overlay-example.yaml similarity index 100% rename from tests/v1.0/pass/targeted-overlay-example.yaml rename to tests/v1.0/pass/actions-targeted-overlay-example.yaml diff --git a/tests/v1.0/pass/traits-example.yaml b/tests/v1.0/pass/actions-traits-example.yaml similarity index 100% rename from tests/v1.0/pass/traits-example.yaml rename to tests/v1.0/pass/actions-traits-example.yaml diff --git a/tests/v1.0/pass/actions-update-with-remove.yaml b/tests/v1.0/pass/actions-update-with-remove.yaml new file mode 100644 index 0000000..211fd96 --- /dev/null +++ b/tests/v1.0/pass/actions-update-with-remove.yaml @@ -0,0 +1,12 @@ +overlay: 1.0.0 +info: + title: Actions Remove and Update defined + version: 1.0.0 +actions: + - target: $.paths.*.get.parameters + update: + name: newParam + in: query + schema: + type: string + remove: true diff --git a/tests/v1.0/pass/wildcard-overlay-example.yaml b/tests/v1.0/pass/actions-wildcard-overlay-example.yaml similarity index 100% rename from tests/v1.0/pass/wildcard-overlay-example.yaml rename to tests/v1.0/pass/actions-wildcard-overlay-example.yaml diff --git a/tests/v1.0/pass/info-extensions.yaml b/tests/v1.0/pass/info-extensions.yaml new file mode 100644 index 0000000..bcee3b6 --- /dev/null +++ b/tests/v1.0/pass/info-extensions.yaml @@ -0,0 +1,7 @@ +overlay: 1.0.0 +info: + title: Info Extensions + version: 1.0.0 + x-myInfoExtension: {} +actions: + - target: '$' # Root of document diff --git a/tests/v1.0/pass/root-extensions.yaml b/tests/v1.0/pass/root-extensions.yaml new file mode 100644 index 0000000..e311b42 --- /dev/null +++ b/tests/v1.0/pass/root-extensions.yaml @@ -0,0 +1,7 @@ +overlay: 1.0.0 +info: + title: Root Extensions + version: 1.0.0 +actions: + - target: '$' # Root of document +x-myExtension: {} From ed7b13b23aecbbc50f53f48ebd1866ffc68089df Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 19 Nov 2024 21:16:51 +0000 Subject: [PATCH 06/30] Add sets of working input/output examples from the openapi-overlays-js codebase --- compliant-sets/README.md | 9 ++ compliant-sets/add-a-license/openapi.yaml | 73 ++++++++++++ compliant-sets/add-a-license/output.yaml | 74 ++++++++++++ compliant-sets/add-a-license/overlay.yaml | 10 ++ .../description-and-summary/openapi.yaml | 73 ++++++++++++ .../description-and-summary/output.yaml | 71 ++++++++++++ .../description-and-summary/overlay.yaml | 10 ++ compliant-sets/many-operations/openapi.yaml | 99 ++++++++++++++++ compliant-sets/many-operations/output.yaml | 109 ++++++++++++++++++ compliant-sets/many-operations/overlay.yaml | 23 ++++ compliant-sets/remove-example/openapi.yaml | 73 ++++++++++++ compliant-sets/remove-example/output.yaml | 69 +++++++++++ compliant-sets/remove-example/overlay.yaml | 7 ++ .../remove-matching-responses/openapi.yaml | 30 +++++ .../remove-matching-responses/output.yaml | 20 ++++ .../remove-matching-responses/overlay.yaml | 11 ++ compliant-sets/remove-property/openapi.yaml | 73 ++++++++++++ compliant-sets/remove-property/output.yaml | 67 +++++++++++ compliant-sets/remove-property/overlay.yaml | 8 ++ compliant-sets/remove-server/openapi.yaml | 10 ++ compliant-sets/remove-server/output.yaml | 8 ++ compliant-sets/remove-server/overlay.yaml | 9 ++ .../replace-servers-for-sandbox/openapi.yaml | 46 ++++++++ .../replace-servers-for-sandbox/output.yaml | 43 +++++++ .../replace-servers-for-sandbox/overlay.yaml | 13 +++ compliant-sets/update-root/openapi.yaml | 73 ++++++++++++ compliant-sets/update-root/output.yaml | 71 ++++++++++++ compliant-sets/update-root/overlay.yaml | 9 ++ 28 files changed, 1191 insertions(+) create mode 100644 compliant-sets/README.md create mode 100644 compliant-sets/add-a-license/openapi.yaml create mode 100644 compliant-sets/add-a-license/output.yaml create mode 100644 compliant-sets/add-a-license/overlay.yaml create mode 100644 compliant-sets/description-and-summary/openapi.yaml create mode 100644 compliant-sets/description-and-summary/output.yaml create mode 100644 compliant-sets/description-and-summary/overlay.yaml create mode 100644 compliant-sets/many-operations/openapi.yaml create mode 100644 compliant-sets/many-operations/output.yaml create mode 100644 compliant-sets/many-operations/overlay.yaml create mode 100644 compliant-sets/remove-example/openapi.yaml create mode 100644 compliant-sets/remove-example/output.yaml create mode 100644 compliant-sets/remove-example/overlay.yaml create mode 100644 compliant-sets/remove-matching-responses/openapi.yaml create mode 100644 compliant-sets/remove-matching-responses/output.yaml create mode 100644 compliant-sets/remove-matching-responses/overlay.yaml create mode 100644 compliant-sets/remove-property/openapi.yaml create mode 100644 compliant-sets/remove-property/output.yaml create mode 100644 compliant-sets/remove-property/overlay.yaml create mode 100644 compliant-sets/remove-server/openapi.yaml create mode 100644 compliant-sets/remove-server/output.yaml create mode 100644 compliant-sets/remove-server/overlay.yaml create mode 100644 compliant-sets/replace-servers-for-sandbox/openapi.yaml create mode 100644 compliant-sets/replace-servers-for-sandbox/output.yaml create mode 100644 compliant-sets/replace-servers-for-sandbox/overlay.yaml create mode 100644 compliant-sets/update-root/openapi.yaml create mode 100644 compliant-sets/update-root/output.yaml create mode 100644 compliant-sets/update-root/overlay.yaml diff --git a/compliant-sets/README.md b/compliant-sets/README.md new file mode 100644 index 0000000..77d34b0 --- /dev/null +++ b/compliant-sets/README.md @@ -0,0 +1,9 @@ +# OpenAPI Overlay Compliant Sets + +The folders in this directory contain sets of "known good" Overlays, along with OpenAPI descriptions before and after the Overlay. +These files are offered as examples of how a series of Overlays are expected to be applied, with the aim of supporting people building tools that apply Overlays. + +Each directory contains: +- `overlay.yaml` - the Overlay +- `openapi.yaml` - an OpenAPI description to use +- `output.yaml` - the OpenAPI description after the Overlay has been applied diff --git a/compliant-sets/add-a-license/openapi.yaml b/compliant-sets/add-a-license/openapi.yaml new file mode 100644 index 0000000..f8902ee --- /dev/null +++ b/compliant-sets/add-a-license/openapi.yaml @@ -0,0 +1,73 @@ +openapi: "3.1.0" +info: + version: 1.0.0 + title: Imaginary town +servers: + - url: https://example.com + description: Example server +paths: + '/buildings': + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Building" + + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: "#/components/schemas/Building" + + '/locations': + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: "North Village" + +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: "house" + location_id: + type: integer + example: 44 diff --git a/compliant-sets/add-a-license/output.yaml b/compliant-sets/add-a-license/output.yaml new file mode 100644 index 0000000..8378332 --- /dev/null +++ b/compliant-sets/add-a-license/output.yaml @@ -0,0 +1,74 @@ +openapi: 3.1.0 +info: + version: 1.0.0 + title: Imaginary town + license: + name: MIT + url: 'https://opensource.org/licenses/MIT' +servers: + - url: 'https://example.com' + description: Example server +paths: + /buildings: + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Building' + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: '#/components/schemas/Building' + /locations: + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: North Village +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: house + location_id: + type: integer + example: 44 + diff --git a/compliant-sets/add-a-license/overlay.yaml b/compliant-sets/add-a-license/overlay.yaml new file mode 100644 index 0000000..3fea356 --- /dev/null +++ b/compliant-sets/add-a-license/overlay.yaml @@ -0,0 +1,10 @@ +overlay: '1.0.0' +info: + title: Add MIT license + version: '1.0.0' +actions: + - target: '$.info' + update: + license: + name: MIT + url: https://opensource.org/licenses/MIT diff --git a/compliant-sets/description-and-summary/openapi.yaml b/compliant-sets/description-and-summary/openapi.yaml new file mode 100644 index 0000000..f8902ee --- /dev/null +++ b/compliant-sets/description-and-summary/openapi.yaml @@ -0,0 +1,73 @@ +openapi: "3.1.0" +info: + version: 1.0.0 + title: Imaginary town +servers: + - url: https://example.com + description: Example server +paths: + '/buildings': + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Building" + + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: "#/components/schemas/Building" + + '/locations': + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: "North Village" + +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: "house" + location_id: + type: integer + example: 44 diff --git a/compliant-sets/description-and-summary/output.yaml b/compliant-sets/description-and-summary/output.yaml new file mode 100644 index 0000000..4394d8f --- /dev/null +++ b/compliant-sets/description-and-summary/output.yaml @@ -0,0 +1,71 @@ +openapi: 3.1.0 +info: + version: 1.0.0 + title: Imaginary town +servers: + - url: 'https://example.com' + description: Example server +paths: + /buildings: + get: + summary: All of the available buildings + operationId: buildingsList + description: This is the summary of getting the buildings + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Building' + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: '#/components/schemas/Building' + /locations: + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: North Village +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: house + location_id: + type: integer + example: 44 diff --git a/compliant-sets/description-and-summary/overlay.yaml b/compliant-sets/description-and-summary/overlay.yaml new file mode 100644 index 0000000..36fb1cb --- /dev/null +++ b/compliant-sets/description-and-summary/overlay.yaml @@ -0,0 +1,10 @@ +overlay: 1.0.0 +info: + title: Add a building endpoint description + version: 1.0.0 +actions: +- target: $.paths['/buildings'].get + update: + description: This is the summary of getting the buildings + summary: All of the available buildings + diff --git a/compliant-sets/many-operations/openapi.yaml b/compliant-sets/many-operations/openapi.yaml new file mode 100644 index 0000000..882133b --- /dev/null +++ b/compliant-sets/many-operations/openapi.yaml @@ -0,0 +1,99 @@ +openapi: "3.0.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +servers: + - url: http://petstore.swagger.io/v1 +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + maximum: 100 + format: int32 + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + Pet: + type: object + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + maxItems: 100 + items: + $ref: "#/components/schemas/Pet" + Error: + type: object + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/compliant-sets/many-operations/output.yaml b/compliant-sets/many-operations/output.yaml new file mode 100644 index 0000000..b200f26 --- /dev/null +++ b/compliant-sets/many-operations/output.yaml @@ -0,0 +1,109 @@ +openapi: 3.0.0 +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +servers: + - url: 'http://petstore.swagger.io/v1' +paths: + /pets: + get: + operationId: listPets + tags: + - pets + - wildcard-done + - overlayed + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + maximum: 100 + format: int32 + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/Pets' + default: + description: unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-info: + x-overlay-applied: structured-overlay + description: This is an added description + post: &ref_0 + foo: + bar: hello + '/pets/{petId}': + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + - wildcard-done + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + default: + description: unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: *ref_0 +components: + schemas: + Pet: + type: object + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + maxItems: 100 + items: + $ref: '#/components/schemas/Pet' + Error: + type: object + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string + diff --git a/compliant-sets/many-operations/overlay.yaml b/compliant-sets/many-operations/overlay.yaml new file mode 100644 index 0000000..805b0b2 --- /dev/null +++ b/compliant-sets/many-operations/overlay.yaml @@ -0,0 +1,23 @@ +overlay: 1.0.0 +info: + title: Structured Overlay + version: 1.0.0 +actions: +- target: $.paths['/pets'].get.summary + remove: true +- target: $.paths.*.get + update: + tags: + - wildcard-done +- target: $.paths['/pets'].get + update: + x-info: + x-overlay-applied: structured-overlay + description: This is an added description + tags: + - overlayed +- target: $.paths.* + update: + post: + foo: + bar: hello diff --git a/compliant-sets/remove-example/openapi.yaml b/compliant-sets/remove-example/openapi.yaml new file mode 100644 index 0000000..f8902ee --- /dev/null +++ b/compliant-sets/remove-example/openapi.yaml @@ -0,0 +1,73 @@ +openapi: "3.1.0" +info: + version: 1.0.0 + title: Imaginary town +servers: + - url: https://example.com + description: Example server +paths: + '/buildings': + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Building" + + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: "#/components/schemas/Building" + + '/locations': + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: "North Village" + +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: "house" + location_id: + type: integer + example: 44 diff --git a/compliant-sets/remove-example/output.yaml b/compliant-sets/remove-example/output.yaml new file mode 100644 index 0000000..24bfdd6 --- /dev/null +++ b/compliant-sets/remove-example/output.yaml @@ -0,0 +1,69 @@ +openapi: 3.1.0 +info: + version: 1.0.0 + title: Imaginary town +servers: + - url: 'https://example.com' + description: Example server +paths: + /buildings: + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Building' + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: '#/components/schemas/Building' + /locations: + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: North Village +components: + schemas: + Building: + type: object + properties: + building: + type: string + location_id: + type: integer + example: 44 diff --git a/compliant-sets/remove-example/overlay.yaml b/compliant-sets/remove-example/overlay.yaml new file mode 100644 index 0000000..5963349 --- /dev/null +++ b/compliant-sets/remove-example/overlay.yaml @@ -0,0 +1,7 @@ +overlay: 1.0.0 +info: + title: Remove an example + version: 1.0.0 +actions: +- target: $.components.schemas.Building.properties['building'].example + remove: true diff --git a/compliant-sets/remove-matching-responses/openapi.yaml b/compliant-sets/remove-matching-responses/openapi.yaml new file mode 100644 index 0000000..8d260cc --- /dev/null +++ b/compliant-sets/remove-matching-responses/openapi.yaml @@ -0,0 +1,30 @@ +openapi: 3.1.0 +info: + title: Responses + version: 1.0.0 +paths: + /foo: + get: + responses: + '200': + description: OK + '500': + description: oops + /bar: + post: + responses: + '201': + description: Created + '500': + description: oops + default: + description: something + /baa: + post: + responses: + '201': + description: Shouted + '500': + description: oops + default: + description: something diff --git a/compliant-sets/remove-matching-responses/output.yaml b/compliant-sets/remove-matching-responses/output.yaml new file mode 100644 index 0000000..ac5444b --- /dev/null +++ b/compliant-sets/remove-matching-responses/output.yaml @@ -0,0 +1,20 @@ +openapi: 3.1.0 +info: + title: Responses + version: 1.0.0 +paths: + /foo: + get: + responses: + '200': + description: OK + /bar: + post: + responses: + '201': + description: Created + /baa: + post: + responses: + '201': + description: Shouted diff --git a/compliant-sets/remove-matching-responses/overlay.yaml b/compliant-sets/remove-matching-responses/overlay.yaml new file mode 100644 index 0000000..6607a77 --- /dev/null +++ b/compliant-sets/remove-matching-responses/overlay.yaml @@ -0,0 +1,11 @@ +overlay: 1.0.0 +info: + title: Response code removal test + version: 1.0.0 + +actions: + - target: $.paths..responses['500'] + remove: true + + - target: $.paths..responses['default'] + remove: true diff --git a/compliant-sets/remove-property/openapi.yaml b/compliant-sets/remove-property/openapi.yaml new file mode 100644 index 0000000..f8902ee --- /dev/null +++ b/compliant-sets/remove-property/openapi.yaml @@ -0,0 +1,73 @@ +openapi: "3.1.0" +info: + version: 1.0.0 + title: Imaginary town +servers: + - url: https://example.com + description: Example server +paths: + '/buildings': + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Building" + + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: "#/components/schemas/Building" + + '/locations': + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: "North Village" + +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: "house" + location_id: + type: integer + example: 44 diff --git a/compliant-sets/remove-property/output.yaml b/compliant-sets/remove-property/output.yaml new file mode 100644 index 0000000..aaf6e0c --- /dev/null +++ b/compliant-sets/remove-property/output.yaml @@ -0,0 +1,67 @@ +openapi: 3.1.0 +info: + version: 1.0.0 + title: Imaginary town +servers: + - url: 'https://example.com' + description: Example server +paths: + /buildings: + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Building' + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: '#/components/schemas/Building' + /locations: + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: house + location_id: + type: integer + example: 44 diff --git a/compliant-sets/remove-property/overlay.yaml b/compliant-sets/remove-property/overlay.yaml new file mode 100644 index 0000000..e143719 --- /dev/null +++ b/compliant-sets/remove-property/overlay.yaml @@ -0,0 +1,8 @@ +overlay: 1.0.0 +info: + title: Remove all string properties + version: 1.0.0 +actions: +- target: $.paths['/locations'].get.responses['200']..properties[?(@.type == 'string')] + remove: true + diff --git a/compliant-sets/remove-server/openapi.yaml b/compliant-sets/remove-server/openapi.yaml new file mode 100644 index 0000000..9187ea5 --- /dev/null +++ b/compliant-sets/remove-server/openapi.yaml @@ -0,0 +1,10 @@ +openapi: 3.1.0 +info: + title: API servers + version: 1.0.0 +servers: + - url: 'https://api.dev.example.com' + description: Dev + - url: 'https://api.example.com' + description: Production +paths: {} diff --git a/compliant-sets/remove-server/output.yaml b/compliant-sets/remove-server/output.yaml new file mode 100644 index 0000000..8195aea --- /dev/null +++ b/compliant-sets/remove-server/output.yaml @@ -0,0 +1,8 @@ +openapi: 3.1.0 +info: + title: API servers + version: 1.0.0 +servers: + - url: 'https://api.example.com' + description: Production +paths: {} diff --git a/compliant-sets/remove-server/overlay.yaml b/compliant-sets/remove-server/overlay.yaml new file mode 100644 index 0000000..aa3a050 --- /dev/null +++ b/compliant-sets/remove-server/overlay.yaml @@ -0,0 +1,9 @@ +overlay: 1.0.0 +info: + title: Remove dev server + version: 1.0.0 +extends: openapi-with-servers.yaml + +actions: + - target: $.servers[?( @.description == 'Dev' )] + remove: true diff --git a/compliant-sets/replace-servers-for-sandbox/openapi.yaml b/compliant-sets/replace-servers-for-sandbox/openapi.yaml new file mode 100644 index 0000000..e514c5b --- /dev/null +++ b/compliant-sets/replace-servers-for-sandbox/openapi.yaml @@ -0,0 +1,46 @@ +openapi: 3.1.0 +info: + title: Simple API + description: A basic OpenAPI description with a single endpoint. + version: 1.0.0 +servers: + - url: https://api.example.com/v1 + description: Production server + - url: https://staging.example.com/v1 + description: Staging server +paths: + /getItems: + get: + summary: Retrieve a list of items + description: Fetch a list of items from the API. + operationId: getItems + responses: + '200': + description: Successful response with items + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Unique identifier for the item + name: + type: string + description: Name of the item + description: + type: string + description: Detailed information about the item + examples: + example1: + summary: Example response + value: + - id: 1 + name: Item One + description: Description for item one + - id: 2 + name: Item Two + description: Description for item two + diff --git a/compliant-sets/replace-servers-for-sandbox/output.yaml b/compliant-sets/replace-servers-for-sandbox/output.yaml new file mode 100644 index 0000000..e354868 --- /dev/null +++ b/compliant-sets/replace-servers-for-sandbox/output.yaml @@ -0,0 +1,43 @@ +openapi: 3.1.0 +info: + title: Simple API + description: A basic OpenAPI description with a single endpoint. + version: 1.0.0 +paths: + /getItems: + get: + summary: Retrieve a list of items + description: Fetch a list of items from the API. + operationId: getItems + responses: + '200': + description: Successful response with items + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Unique identifier for the item + name: + type: string + description: Name of the item + description: + type: string + description: Detailed information about the item + examples: + example1: + summary: Example response + value: + - id: 1 + name: Item One + description: Description for item one + - id: 2 + name: Item Two + description: Description for item two +servers: + - url: http://api-test-tunnel.local + description: Local development server diff --git a/compliant-sets/replace-servers-for-sandbox/overlay.yaml b/compliant-sets/replace-servers-for-sandbox/overlay.yaml new file mode 100644 index 0000000..dd1ffde --- /dev/null +++ b/compliant-sets/replace-servers-for-sandbox/overlay.yaml @@ -0,0 +1,13 @@ +overlay: 1.0.0 +info: + title: Change server URL + description: Replace servers list with a single sandbox or local development URL for the API + version: 1.0.0 +actions: + - target: '$.servers' + remove: true + - target: '$' + update: + servers: + - url: http://api-test-tunnel.local + description: Local development server \ No newline at end of file diff --git a/compliant-sets/update-root/openapi.yaml b/compliant-sets/update-root/openapi.yaml new file mode 100644 index 0000000..f8902ee --- /dev/null +++ b/compliant-sets/update-root/openapi.yaml @@ -0,0 +1,73 @@ +openapi: "3.1.0" +info: + version: 1.0.0 + title: Imaginary town +servers: + - url: https://example.com + description: Example server +paths: + '/buildings': + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Building" + + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: "#/components/schemas/Building" + + '/locations': + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: "North Village" + +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: "house" + location_id: + type: integer + example: 44 diff --git a/compliant-sets/update-root/output.yaml b/compliant-sets/update-root/output.yaml new file mode 100644 index 0000000..22fbe70 --- /dev/null +++ b/compliant-sets/update-root/output.yaml @@ -0,0 +1,71 @@ +openapi: 3.1.0 +info: + version: 1.0.0 + title: Imaginary town + x-overlaid: true +servers: + - url: 'https://example.com' + description: Example server +paths: + /buildings: + get: + summary: All buildings + operationId: buildingsList + responses: + '200': + description: Return all known buildings + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Building' + '/buildings/{buildingId}': + get: + summary: Specific building + operationId: buildingById + parameters: + - name: buildingId + in: path + required: true + description: Which building to return + schema: + type: string + responses: + '200': + description: Return a building + content: + application/json: + schema: + $ref: '#/components/schemas/Building' + /locations: + get: + summary: All locations + operationId: locationList + responses: + '200': + description: Returns all locations + content: + application/json: + schema: + type: array + items: + type: object + properties: + location_id: + type: integer + example: 44 + name: + type: string + example: North Village +components: + schemas: + Building: + type: object + properties: + building: + type: string + example: house + location_id: + type: integer + example: 44 diff --git a/compliant-sets/update-root/overlay.yaml b/compliant-sets/update-root/overlay.yaml new file mode 100644 index 0000000..606ec8f --- /dev/null +++ b/compliant-sets/update-root/overlay.yaml @@ -0,0 +1,9 @@ +overlay: 1.0.0 +info: + title: Structured Overlay + version: 1.0.0 +actions: +- target: "$" # Root of document + update: + info: + x-overlaid: true From ef6d5a21356f96bbcf2afc5a2bb54e8b9b4fc4c8 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 22 Nov 2024 18:02:01 +0100 Subject: [PATCH 07/30] schema-publish workflow --- .github/workflows/schema-publish.yaml | 59 +++++++++++++++++++++++++++ scripts/schema-publish.sh | 54 ++++++++++++++++++++++++ scripts/yaml2json/yaml2json.js | 30 ++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 .github/workflows/schema-publish.yaml create mode 100755 scripts/schema-publish.sh create mode 100755 scripts/yaml2json/yaml2json.js diff --git a/.github/workflows/schema-publish.yaml b/.github/workflows/schema-publish.yaml new file mode 100644 index 0000000..2dc59c3 --- /dev/null +++ b/.github/workflows/schema-publish.yaml @@ -0,0 +1,59 @@ +name: schema-publish + +# author: @ralfhandl + +# +# This workflow copies the x.y schemas to the gh-pages branch +# + +# run this on push to main +on: + push: + branches: + - main + workflow_dispatch: {} + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 # checkout main branch + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 # setup Node.js + with: + node-version: 20.x + + - name: Install dependencies + run: npm ci + + - uses: actions/checkout@v4 # checkout gh-pages branch + with: + token: ${{ secrets.OAS_REPO_TOKEN }} + repository: OAI/OpenAPI-Specification + ref: gh-pages + path: deploy + + - name: run main script + run: scripts/schema-publish.sh + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + # A personal access token is required to push changes to the repository. + # This token needs to be refreshed regularly and stored in the repository secrets. + token: ${{ secrets.OAS_REPO_TOKEN }} + branch: publish-overlay-schema-iteration + base: gh-pages + delete-branch: true + path: deploy + labels: Housekeeping,Schema + reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews + title: Publish Overlay Schema Iterations + commit-message: New Overlay schema iterations + signoff: true + body: | + This pull request is automatically triggered by GitHub action `schema-publish` in the OAI/Overlay-Specification repo. + The `schemas/**/*.yaml` files have changed and JSON files are automatically generated. diff --git a/scripts/schema-publish.sh b/scripts/schema-publish.sh new file mode 100755 index 0000000..ab2cff7 --- /dev/null +++ b/scripts/schema-publish.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Author: @ralfhandl + +# Run this script from the root of the repo. It is designed to be run by a GitHub workflow. + +for schemaDir in schemas/v* ; do + vVersion=$(basename "$schemaDir") + version=${vVersion:1} + echo $version + + # list of schemas to process, dependent schemas come first + schemas=(schema.yaml) + + # find the newest commit date for each schema + maxDate="" + declare -A datesHash + for schema in "${schemas[@]}"; do + if [ -f "$schemaDir/$schema" ]; then + newestCommitDate=$(git log -1 --format="%ad" --date=short "$schemaDir/$schema") + + # the newest date across a schema and all its dependencies is its date stamp + if [ "$newestCommitDate" \> "$maxDate" ]; then + maxDate=$newestCommitDate + fi + datesHash["$schema"]=$maxDate + echo $schema changed at $newestCommitDate + fi + done + + # construct sed command + sedCmd=() + for schema in "${!datesHash[@]}"; do + base=$(basename "$schema" .yaml) + sedCmd+=("-e s/$base\/WORK-IN-PROGRESS/$base\/${datesHash[$schema]}/g") + done + + # create the date-stamped schemas + for schema in "${!datesHash[@]}"; do + base=$(basename "$schema" .yaml) + target=deploy/overlay/$version/$base/${datesHash[$schema]} + + mkdir -p "deploy/overlay/$version/$base" + + sed ${sedCmd[@]} $schemaDir/$schema > $target.yaml + node scripts/yaml2json/yaml2json.js $target.yaml + rm $target.yaml + mv $target.json $target + + mv deploy/overlay/$version/$base/*.md $target.md + done + + echo "" +done diff --git a/scripts/yaml2json/yaml2json.js b/scripts/yaml2json/yaml2json.js new file mode 100755 index 0000000..decb075 --- /dev/null +++ b/scripts/yaml2json/yaml2json.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +'use strict'; + +const fs = require('fs'); +const yaml = require('yaml'); + +function convert(filename) { + // console.log(filename); + const s = fs.readFileSync(filename,'utf8'); + let obj; + try { + obj = yaml.parse(s, {prettyErrors: true}); + fs.writeFileSync(filename.replace('.yaml','.json'),JSON.stringify(obj,null,2),'utf8'); + } + catch (ex) { + console.warn(' ',ex.message); + process.exitCode = 1; + } +} + +if (process.argv.length<3) { + console.warn('Usage: yaml2json {infiles}'); +} +else { + for (let i=2;i Date: Tue, 26 Nov 2024 10:04:44 +0100 Subject: [PATCH 08/30] Generate minor-version symlinks --- scripts/md2html/build.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index 215ce4a..1d8436e 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -15,22 +15,32 @@ cp ../../EDITORS.md history/EDITORS_v1.0.0.md # temporarily copy installed version of respec into build directory cp -p ../../node_modules/respec/builds/respec-w3c.* ../../deploy/js/ +# latest=`git describe --abbrev=0 --tags` -- introduce after release tags created latest=1.0.0 latestCopied=none -for filename in ../../versions/*.md ; do +lastMinor="-" +for filename in $(ls -1 ../../versions/[123456789].*.md | sort -r) ; do version=$(basename "$filename" .md) + minorVersion=${version:0:3} tempfile=../../deploy/overlay/v$version-tmp.html echo -e "\n=== v$version ===" + node md2html.js --maintainers ./history/EDITORS_v$version.md ${filename} > $tempfile npx respec --use-local --src $tempfile --out ../../deploy/overlay/v$version.html rm $tempfile + if [ $version = $latest ]; then if [[ ${version} != *"rc"* ]];then # version is not a Release Candidate - cp -p ../../deploy/overlay/v$version.html ../../deploy/overlay/latest.html + ( cd ../../deploy/overlay && ln -sf v$version.html latest.html ) latestCopied=v$version fi fi + + if [ ${minorVersion} != ${lastMinor} ]; then + ( cd ../../deploy/overlay && ln -sf v$version.html v$minorVersion.html ) + lastMinor=$minorVersion + fi done echo Latest tag is $latest, copied $latestCopied to latest.html From 7a8f0fe25ec80735c58730fd2b5af6336694e7a1 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 3 Dec 2024 17:28:35 +0100 Subject: [PATCH 09/30] Can't be on the reviewer's list while we use my access token --- .github/workflows/schema-publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/schema-publish.yaml b/.github/workflows/schema-publish.yaml index 2dc59c3..38084d4 100644 --- a/.github/workflows/schema-publish.yaml +++ b/.github/workflows/schema-publish.yaml @@ -50,7 +50,7 @@ jobs: delete-branch: true path: deploy labels: Housekeeping,Schema - reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews + reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews title: Publish Overlay Schema Iterations commit-message: New Overlay schema iterations signoff: true From 7ca5ce2ebc061a8ae05f17317fe8ec9ffaa036fc Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 4 Dec 2024 14:29:54 +0100 Subject: [PATCH 10/30] return code 1 if schema test coverage below 100% --- scripts/schema-test-coverage.mjs | 1 + scripts/schema-test-coverage.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/schema-test-coverage.mjs b/scripts/schema-test-coverage.mjs index 9953a5c..6be4eb1 100644 --- a/scripts/schema-test-coverage.mjs +++ b/scripts/schema-test-coverage.mjs @@ -121,6 +121,7 @@ if (notCovered.length > 0) { const firstNotCovered = notCovered.slice(0, maxNotCovered); if (notCovered.length > maxNotCovered) firstNotCovered.push("..."); console.log(firstNotCovered); + process.exitCode = 1; } console.log( diff --git a/scripts/schema-test-coverage.sh b/scripts/schema-test-coverage.sh index ee3acef..8909619 100755 --- a/scripts/schema-test-coverage.sh +++ b/scripts/schema-test-coverage.sh @@ -8,11 +8,15 @@ echo echo "Schema Test Coverage" echo +rc=0 + for schemaDir in schemas/v* ; do version=$(basename "$schemaDir") echo $version - node scripts/schema-test-coverage.mjs $schemaDir/schema.yaml tests/$version/pass + node scripts/schema-test-coverage.mjs $schemaDir/schema.yaml tests/$version/pass || rc=1 echo done + +exit $rc From 0268923743bf90e54e02fe9e82744c8b0cd752d6 Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 17 Dec 2024 09:16:33 +0000 Subject: [PATCH 11/30] Add branching strategy info and some key information to the contributing file --- CONTRIBUTING.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3a74309..666fa1c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,6 +7,38 @@ Pull requests are also welcome, but it is recommended to create an issue first, Questions and comments are also welcome - use the GitHub Discussions feature. You will also find notes from past meetings in the Discussion tab. +## Key information + +This project is covered by our [Code of Conduct](https://github.com/OAI/OpenAPI-Specification?tab=coc-ov-file#readme). +All participants are expected to read and follow this code. + +No changes, however trivial, are ever made to the contents of published specifications (the files in the `versions/` folder). +Exceptions may be made when links to external URLs have been changed by a 3rd party, in order to keep our documents accurate. + +Published versions of the specification are in the `versions/` folder. +The under-development versions of the specification are in the file `spec/overlay.md` on the appropriately-versioned branch. +For example, work on the next release for 1.1 is on `v1.1-dev` in the file `spec/overlay.md`. + +The [spec site](https://spec.openapis.org) is the source of truth for the OpenAPI Overlay specification as it contains all the citations and author credits. + +The OpenAPI project is almost entirely staffed by volunteers. +Please be patient with the people in this project, who all have other jobs and are active here because we believe this project has a positive impact in the world. + +## Pull Requests + +Pull requests are always welcome but please read the section below on [branching strategy](#branching-strategy) before you start. + +Pull requests must come from a fork; create a fresh branch on your fork based on the target branch for your change. + +### Branching Strategy + +Overview of branches: + +- `main` holds the published versions of the specification, utility scripts and supporting documentation. +- `dev` is for development infrastructure and other changes that apply to multiple versions of development. +- Branches named `vX.Y-dev` are the active development branches for future releases. + All changes should be applied to the _earliest_ branch where the changes is relevant in the first instance. + ## Build the HTML version to publish We use ReSpec to render the markdown specification as HTML for publishing and easier reading. From 8a9ca7a2a46f3c001ac6a844fa339393ffb3c4c5 Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 17 Dec 2024 10:12:45 +0000 Subject: [PATCH 12/30] Update CONTRIBUTING.md Co-authored-by: Ralf Handl --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 666fa1c..d5221ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ Overview of branches: - `main` holds the published versions of the specification, utility scripts and supporting documentation. - `dev` is for development infrastructure and other changes that apply to multiple versions of development. - Branches named `vX.Y-dev` are the active development branches for future releases. - All changes should be applied to the _earliest_ branch where the changes is relevant in the first instance. + All changes should be applied to the _earliest_ branch where the changes are relevant in the first instance. ## Build the HTML version to publish From 115d603eda37a05f4db70f71ad2a9ae3ebdf9f70 Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 17 Dec 2024 11:06:34 +0000 Subject: [PATCH 13/30] Update CONTRIBUTING.md Co-authored-by: Ralf Handl --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d5221ca..fdbd4b5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ This project is covered by our [Code of Conduct](https://github.com/OAI/OpenAPI- All participants are expected to read and follow this code. No changes, however trivial, are ever made to the contents of published specifications (the files in the `versions/` folder). -Exceptions may be made when links to external URLs have been changed by a 3rd party, in order to keep our documents accurate. +Exceptions may be made when links to external documents have been changed by a 3rd party, in order to keep our documents accurate. Published versions of the specification are in the `versions/` folder. The under-development versions of the specification are in the file `spec/overlay.md` on the appropriately-versioned branch. From 65209918c3dd6654b578d24b76d566e359fff66c Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 17 Dec 2024 17:41:20 +0000 Subject: [PATCH 14/30] Correct the file location of the specification --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fdbd4b5..a627cfb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,8 +16,8 @@ No changes, however trivial, are ever made to the contents of published specific Exceptions may be made when links to external documents have been changed by a 3rd party, in order to keep our documents accurate. Published versions of the specification are in the `versions/` folder. -The under-development versions of the specification are in the file `spec/overlay.md` on the appropriately-versioned branch. -For example, work on the next release for 1.1 is on `v1.1-dev` in the file `spec/overlay.md`. +The under-development versions of the specification are in the file `src/overlay.md` on the appropriately-versioned branch. +For example, work on the next release for 1.1 is on `v1.1-dev` in the file `src/overlay.md`. The [spec site](https://spec.openapis.org) is the source of truth for the OpenAPI Overlay specification as it contains all the citations and author credits. From bde9489968d7a21eb6a2c43dc56586c1615702b7 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Sun, 22 Dec 2024 23:03:31 +0100 Subject: [PATCH 15/30] Use app-generated access token --- .github/workflows/schema-publish.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/schema-publish.yaml b/.github/workflows/schema-publish.yaml index 38084d4..91bc36b 100644 --- a/.github/workflows/schema-publish.yaml +++ b/.github/workflows/schema-publish.yaml @@ -18,6 +18,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Generate access token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }} + private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }} + owner: OAI + repositories: OpenAPI-Specification + - uses: actions/checkout@v4 # checkout main branch with: fetch-depth: 0 @@ -31,7 +40,7 @@ jobs: - uses: actions/checkout@v4 # checkout gh-pages branch with: - token: ${{ secrets.OAS_REPO_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} repository: OAI/OpenAPI-Specification ref: gh-pages path: deploy @@ -42,16 +51,14 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: - # A personal access token is required to push changes to the repository. - # This token needs to be refreshed regularly and stored in the repository secrets. - token: ${{ secrets.OAS_REPO_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} branch: publish-overlay-schema-iteration base: gh-pages delete-branch: true path: deploy labels: Housekeeping,Schema - reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews - title: Publish Overlay Schema Iterations + reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl + title: Overlay - Publish Schema Iterations commit-message: New Overlay schema iterations signoff: true body: | From cd94bed340a602aeeaa3938454dd0064e3c02be4 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Sun, 22 Dec 2024 23:06:39 +0100 Subject: [PATCH 16/30] Use app-generated access token --- .github/workflows/respec.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/respec.yaml b/.github/workflows/respec.yaml index d7c93b8..05edbd5 100644 --- a/.github/workflows/respec.yaml +++ b/.github/workflows/respec.yaml @@ -22,6 +22,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Generate access token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }} + private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }} + owner: OAI + repositories: OpenAPI-Specification + - uses: actions/checkout@v4 # checkout main branch with: fetch-depth: 0 @@ -35,7 +44,7 @@ jobs: - uses: actions/checkout@v4 # checkout gh-pages branch with: - token: ${{ secrets.OAS_REPO_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} repository: OAI/OpenAPI-Specification # TODO: change to OAI/... ref: gh-pages path: deploy @@ -46,16 +55,14 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: - # A personal access token is required to push changes to the repository. - # This token needs to be refreshed regularly and stored in the repository secrets. - token: ${{ secrets.OAS_REPO_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} branch: update-overlay-respec-version base: gh-pages delete-branch: true path: deploy labels: Housekeeping team-reviewers: OAI/tsc - title: Update ReSpec-rendered specification versions for Overlay + title: Overlay - Update ReSpec-rendered specification versions commit-message: Update ReSpec-rendered specification versions signoff: true body: | From 8b9f7f84e90f82f63ac745298a50f355c44fd67c Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Mon, 23 Dec 2024 10:55:19 +0100 Subject: [PATCH 17/30] Use ubuntu-22.04 --- .github/workflows/respec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/respec.yaml b/.github/workflows/respec.yaml index 05edbd5..3e248c8 100644 --- a/.github/workflows/respec.yaml +++ b/.github/workflows/respec.yaml @@ -19,7 +19,7 @@ jobs: respec: if: github.repository == 'OAI/Overlay-Specification' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Generate access token From cbe01ffd588255fb22567381afd60460d5f53b09 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Mon, 23 Dec 2024 11:00:46 +0100 Subject: [PATCH 18/30] Use reviewers instead of team-reviewers --- .github/workflows/respec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/respec.yaml b/.github/workflows/respec.yaml index 3e248c8..e3cf9c5 100644 --- a/.github/workflows/respec.yaml +++ b/.github/workflows/respec.yaml @@ -61,7 +61,7 @@ jobs: delete-branch: true path: deploy labels: Housekeeping - team-reviewers: OAI/tsc + reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl title: Overlay - Update ReSpec-rendered specification versions commit-message: Update ReSpec-rendered specification versions signoff: true From cf5a209f73a81f5db6b7a9201032bc8a400ac1bf Mon Sep 17 00:00:00 2001 From: Thim Date: Tue, 31 Dec 2024 16:52:17 +0100 Subject: [PATCH 19/30] Added OpenAPI-Format as Overlay tool --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 29a1bcc..f5cb15e 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ If you are looking for tools to use with Overlays, try these: - [Speakeasy CLI](https://www.speakeasy.com/docs/speakeasy-cli/getting-started) - [overlays-js](https://github.com/lornajane/openapi-overlays-js) - [apigee-go-gen CLI](https://apigee.github.io/apigee-go-gen/transform/commands/oas-overlay/) +- [openapi-format CLI/UI](https://github.com/thim81/openapi-format) (Is something missing from the list? Send us a pull request to add it!) From 73f016be267855559bbec0e16a1845dfa810c057 Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 11 Mar 2025 15:39:12 +0000 Subject: [PATCH 20/30] Remove the many operations example as it has strange refs in --- compliant-sets/many-operations/openapi.yaml | 99 ------------------ compliant-sets/many-operations/output.yaml | 109 -------------------- compliant-sets/many-operations/overlay.yaml | 23 ----- 3 files changed, 231 deletions(-) delete mode 100644 compliant-sets/many-operations/openapi.yaml delete mode 100644 compliant-sets/many-operations/output.yaml delete mode 100644 compliant-sets/many-operations/overlay.yaml diff --git a/compliant-sets/many-operations/openapi.yaml b/compliant-sets/many-operations/openapi.yaml deleted file mode 100644 index 882133b..0000000 --- a/compliant-sets/many-operations/openapi.yaml +++ /dev/null @@ -1,99 +0,0 @@ -openapi: "3.0.0" -info: - version: 1.0.0 - title: Swagger Petstore - license: - name: MIT -servers: - - url: http://petstore.swagger.io/v1 -paths: - /pets: - get: - summary: List all pets - operationId: listPets - tags: - - pets - parameters: - - name: limit - in: query - description: How many items to return at one time (max 100) - required: false - schema: - type: integer - maximum: 100 - format: int32 - responses: - '200': - description: A paged array of pets - headers: - x-next: - description: A link to the next page of responses - schema: - type: string - content: - application/json: - schema: - $ref: "#/components/schemas/Pets" - default: - description: unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /pets/{petId}: - get: - summary: Info for a specific pet - operationId: showPetById - tags: - - pets - parameters: - - name: petId - in: path - required: true - description: The id of the pet to retrieve - schema: - type: string - responses: - '200': - description: Expected response to a valid request - content: - application/json: - schema: - $ref: "#/components/schemas/Pet" - default: - description: unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" -components: - schemas: - Pet: - type: object - required: - - id - - name - properties: - id: - type: integer - format: int64 - name: - type: string - tag: - type: string - Pets: - type: array - maxItems: 100 - items: - $ref: "#/components/schemas/Pet" - Error: - type: object - required: - - code - - message - properties: - code: - type: integer - format: int32 - message: - type: string diff --git a/compliant-sets/many-operations/output.yaml b/compliant-sets/many-operations/output.yaml deleted file mode 100644 index b200f26..0000000 --- a/compliant-sets/many-operations/output.yaml +++ /dev/null @@ -1,109 +0,0 @@ -openapi: 3.0.0 -info: - version: 1.0.0 - title: Swagger Petstore - license: - name: MIT -servers: - - url: 'http://petstore.swagger.io/v1' -paths: - /pets: - get: - operationId: listPets - tags: - - pets - - wildcard-done - - overlayed - parameters: - - name: limit - in: query - description: How many items to return at one time (max 100) - required: false - schema: - type: integer - maximum: 100 - format: int32 - responses: - '200': - description: A paged array of pets - headers: - x-next: - description: A link to the next page of responses - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/Pets' - default: - description: unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - x-info: - x-overlay-applied: structured-overlay - description: This is an added description - post: &ref_0 - foo: - bar: hello - '/pets/{petId}': - get: - summary: Info for a specific pet - operationId: showPetById - tags: - - pets - - wildcard-done - parameters: - - name: petId - in: path - required: true - description: The id of the pet to retrieve - schema: - type: string - responses: - '200': - description: Expected response to a valid request - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - default: - description: unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: *ref_0 -components: - schemas: - Pet: - type: object - required: - - id - - name - properties: - id: - type: integer - format: int64 - name: - type: string - tag: - type: string - Pets: - type: array - maxItems: 100 - items: - $ref: '#/components/schemas/Pet' - Error: - type: object - required: - - code - - message - properties: - code: - type: integer - format: int32 - message: - type: string - diff --git a/compliant-sets/many-operations/overlay.yaml b/compliant-sets/many-operations/overlay.yaml deleted file mode 100644 index 805b0b2..0000000 --- a/compliant-sets/many-operations/overlay.yaml +++ /dev/null @@ -1,23 +0,0 @@ -overlay: 1.0.0 -info: - title: Structured Overlay - version: 1.0.0 -actions: -- target: $.paths['/pets'].get.summary - remove: true -- target: $.paths.*.get - update: - tags: - - wildcard-done -- target: $.paths['/pets'].get - update: - x-info: - x-overlay-applied: structured-overlay - description: This is an added description - tags: - - overlayed -- target: $.paths.* - update: - post: - foo: - bar: hello From 223435ea968aff0851c131177d22d69d2a0c8749 Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 25 Mar 2025 14:28:39 +0000 Subject: [PATCH 21/30] Reformat all input openapi files to match format of output openapi files --- compliant-sets/add-a-license/openapi.yaml | 19 ++++++++----------- .../description-and-summary/openapi.yaml | 19 ++++++++----------- compliant-sets/remove-example/openapi.yaml | 19 ++++++++----------- compliant-sets/remove-property/openapi.yaml | 19 ++++++++----------- compliant-sets/update-root/openapi.yaml | 19 ++++++++----------- 5 files changed, 40 insertions(+), 55 deletions(-) diff --git a/compliant-sets/add-a-license/openapi.yaml b/compliant-sets/add-a-license/openapi.yaml index f8902ee..12a99c1 100644 --- a/compliant-sets/add-a-license/openapi.yaml +++ b/compliant-sets/add-a-license/openapi.yaml @@ -1,12 +1,12 @@ -openapi: "3.1.0" +openapi: 3.1.0 info: version: 1.0.0 title: Imaginary town servers: - - url: https://example.com + - url: 'https://example.com' description: Example server paths: - '/buildings': + /buildings: get: summary: All buildings operationId: buildingsList @@ -18,8 +18,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/Building" - + $ref: '#/components/schemas/Building' '/buildings/{buildingId}': get: summary: Specific building @@ -37,9 +36,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Building" - - '/locations': + $ref: '#/components/schemas/Building' + /locations: get: summary: All locations operationId: locationList @@ -58,8 +56,7 @@ paths: example: 44 name: type: string - example: "North Village" - + example: North Village components: schemas: Building: @@ -67,7 +64,7 @@ components: properties: building: type: string - example: "house" + example: house location_id: type: integer example: 44 diff --git a/compliant-sets/description-and-summary/openapi.yaml b/compliant-sets/description-and-summary/openapi.yaml index f8902ee..12a99c1 100644 --- a/compliant-sets/description-and-summary/openapi.yaml +++ b/compliant-sets/description-and-summary/openapi.yaml @@ -1,12 +1,12 @@ -openapi: "3.1.0" +openapi: 3.1.0 info: version: 1.0.0 title: Imaginary town servers: - - url: https://example.com + - url: 'https://example.com' description: Example server paths: - '/buildings': + /buildings: get: summary: All buildings operationId: buildingsList @@ -18,8 +18,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/Building" - + $ref: '#/components/schemas/Building' '/buildings/{buildingId}': get: summary: Specific building @@ -37,9 +36,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Building" - - '/locations': + $ref: '#/components/schemas/Building' + /locations: get: summary: All locations operationId: locationList @@ -58,8 +56,7 @@ paths: example: 44 name: type: string - example: "North Village" - + example: North Village components: schemas: Building: @@ -67,7 +64,7 @@ components: properties: building: type: string - example: "house" + example: house location_id: type: integer example: 44 diff --git a/compliant-sets/remove-example/openapi.yaml b/compliant-sets/remove-example/openapi.yaml index f8902ee..12a99c1 100644 --- a/compliant-sets/remove-example/openapi.yaml +++ b/compliant-sets/remove-example/openapi.yaml @@ -1,12 +1,12 @@ -openapi: "3.1.0" +openapi: 3.1.0 info: version: 1.0.0 title: Imaginary town servers: - - url: https://example.com + - url: 'https://example.com' description: Example server paths: - '/buildings': + /buildings: get: summary: All buildings operationId: buildingsList @@ -18,8 +18,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/Building" - + $ref: '#/components/schemas/Building' '/buildings/{buildingId}': get: summary: Specific building @@ -37,9 +36,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Building" - - '/locations': + $ref: '#/components/schemas/Building' + /locations: get: summary: All locations operationId: locationList @@ -58,8 +56,7 @@ paths: example: 44 name: type: string - example: "North Village" - + example: North Village components: schemas: Building: @@ -67,7 +64,7 @@ components: properties: building: type: string - example: "house" + example: house location_id: type: integer example: 44 diff --git a/compliant-sets/remove-property/openapi.yaml b/compliant-sets/remove-property/openapi.yaml index f8902ee..12a99c1 100644 --- a/compliant-sets/remove-property/openapi.yaml +++ b/compliant-sets/remove-property/openapi.yaml @@ -1,12 +1,12 @@ -openapi: "3.1.0" +openapi: 3.1.0 info: version: 1.0.0 title: Imaginary town servers: - - url: https://example.com + - url: 'https://example.com' description: Example server paths: - '/buildings': + /buildings: get: summary: All buildings operationId: buildingsList @@ -18,8 +18,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/Building" - + $ref: '#/components/schemas/Building' '/buildings/{buildingId}': get: summary: Specific building @@ -37,9 +36,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Building" - - '/locations': + $ref: '#/components/schemas/Building' + /locations: get: summary: All locations operationId: locationList @@ -58,8 +56,7 @@ paths: example: 44 name: type: string - example: "North Village" - + example: North Village components: schemas: Building: @@ -67,7 +64,7 @@ components: properties: building: type: string - example: "house" + example: house location_id: type: integer example: 44 diff --git a/compliant-sets/update-root/openapi.yaml b/compliant-sets/update-root/openapi.yaml index f8902ee..12a99c1 100644 --- a/compliant-sets/update-root/openapi.yaml +++ b/compliant-sets/update-root/openapi.yaml @@ -1,12 +1,12 @@ -openapi: "3.1.0" +openapi: 3.1.0 info: version: 1.0.0 title: Imaginary town servers: - - url: https://example.com + - url: 'https://example.com' description: Example server paths: - '/buildings': + /buildings: get: summary: All buildings operationId: buildingsList @@ -18,8 +18,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/Building" - + $ref: '#/components/schemas/Building' '/buildings/{buildingId}': get: summary: Specific building @@ -37,9 +36,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Building" - - '/locations': + $ref: '#/components/schemas/Building' + /locations: get: summary: All locations operationId: locationList @@ -58,8 +56,7 @@ paths: example: 44 name: type: string - example: "North Village" - + example: North Village components: schemas: Building: @@ -67,7 +64,7 @@ components: properties: building: type: string - example: "house" + example: house location_id: type: integer example: 44 From e217c654562f7944dbde323e2367773208b0e621 Mon Sep 17 00:00:00 2001 From: Matthieu Croissant Date: Fri, 4 Apr 2025 13:24:42 +0200 Subject: [PATCH 22/30] Add oas-patch to tools section Adding a new python based cli to the tool section --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f5cb15e..54c07e9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ If you are looking for tools to use with Overlays, try these: - [overlays-js](https://github.com/lornajane/openapi-overlays-js) - [apigee-go-gen CLI](https://apigee.github.io/apigee-go-gen/transform/commands/oas-overlay/) - [openapi-format CLI/UI](https://github.com/thim81/openapi-format) +- [oas-patch CLI](https://github.com/mcroissant/oas_patcher) (Is something missing from the list? Send us a pull request to add it!) From 08b2de6ce675f3752aa44d2e89b1dee6fb44eb36 Mon Sep 17 00:00:00 2001 From: Andrew Smithson Date: Thu, 27 Mar 2025 16:42:12 +0000 Subject: [PATCH 23/30] Add oas-overlay-java to tools section --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 54c07e9..edce32a 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ If you are looking for tools to use with Overlays, try these: - [apigee-go-gen CLI](https://apigee.github.io/apigee-go-gen/transform/commands/oas-overlay/) - [openapi-format CLI/UI](https://github.com/thim81/openapi-format) - [oas-patch CLI](https://github.com/mcroissant/oas_patcher) +- [oas-overlay-java](https://github.com/IBM/oas-overlay-java) (Is something missing from the list? Send us a pull request to add it!) From f7b84baee822246c73f822d310314a456fefc2db Mon Sep 17 00:00:00 2001 From: HariKrishnan Date: Tue, 27 May 2025 09:12:04 -0700 Subject: [PATCH 24/30] doc: Add Specmatic to the list tools that support Overlay 1.0 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index edce32a..8034b4c 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ If you are looking for tools to use with Overlays, try these: - [openapi-format CLI/UI](https://github.com/thim81/openapi-format) - [oas-patch CLI](https://github.com/mcroissant/oas_patcher) - [oas-overlay-java](https://github.com/IBM/oas-overlay-java) +- [Specmatic](https://specmatic.io/) - [Docs](https://docs.specmatic.io/documentation/contract_tests.html#overlays) (Is something missing from the list? Send us a pull request to add it!) From 1c696f635fd4385f49c2f043f9c1005d7f0de0c7 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 7 Jul 2025 07:42:52 -0400 Subject: [PATCH 25/30] docs: adds documentation for overlay-dotnet Signed-off-by: Vincent Biret --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8034b4c..b4fd879 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ If you are looking for tools to use with Overlays, try these: - [oas-patch CLI](https://github.com/mcroissant/oas_patcher) - [oas-overlay-java](https://github.com/IBM/oas-overlay-java) - [Specmatic](https://specmatic.io/) - [Docs](https://docs.specmatic.io/documentation/contract_tests.html#overlays) +- [BinkyLabs.OpenApi.Overlays - dotnet](https://github.com/BinkyLabs/openapi-overlays-dotnet) (Is something missing from the list? Send us a pull request to add it!) From 063c646fe99102796d65d264e0c46ef81a4a5e8f Mon Sep 17 00:00:00 2001 From: Lorna Mitchell Date: Tue, 29 Jul 2025 11:25:05 +0100 Subject: [PATCH 26/30] Add the meeting link to the new platform --- .github/templates/agenda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/agenda.md b/.github/templates/agenda.md index 34481a6..85e5482 100644 --- a/.github/templates/agenda.md +++ b/.github/templates/agenda.md @@ -3,7 +3,7 @@ - Meeting link: + Meeting link: From 64c23ba5552101f8d277525abca8efd3779c0794 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 21 Aug 2025 13:18:25 -0400 Subject: [PATCH 27/30] ci: adds a schedule for automated creation of bi-weekly meetings Signed-off-by: Vincent Biret --- .github/workflows/agenda.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/agenda.yaml b/.github/workflows/agenda.yaml index d3f97f3..12448e8 100644 --- a/.github/workflows/agenda.yaml +++ b/.github/workflows/agenda.yaml @@ -2,6 +2,9 @@ name: Create meeting template on: workflow_dispatch: {} + schedule: + # every two weeks on tuesday at 8AM PST (with DST) + - cron: '0 15 */14 * 2' jobs: create-discussion: @@ -16,6 +19,11 @@ jobs: echo 'AGENDA<> $GITHUB_ENV cat .github/templates/agenda.md >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV + - name: Get Next Meeting Date + id: get-next-meeting-date + run: | + NEXT_MEETING_DATE=$(date -d "next Tuesday 08:00" +%Y-%m-%d) + echo "NEXT_MEETING_DATE=$NEXT_MEETING_DATE" >> $GITHUB_ENV - name: Create discussion with agenda id: create-repository-discussion uses: octokit/graphql-action@v2.x @@ -24,7 +32,7 @@ jobs: with: variables: | body: "${{ env.AGENDA }}" - title: "Overlays Meeting" + title: "Overlays Meeting (${{ env.NEXT_MEETING_DATE }})" repositoryId: 'MDEwOlJlcG9zaXRvcnkzNTk4NjU5MDI=' categoryId: 'DIC_kwDOFXMeLs4COVB8' query: | From f9e9447a0ffc7171e725d570d58481eb268c1ce9 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 21 Aug 2025 13:20:21 -0400 Subject: [PATCH 28/30] fix: run after the meeting time to avoid skew Signed-off-by: Vincent Biret --- .github/workflows/agenda.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/agenda.yaml b/.github/workflows/agenda.yaml index 12448e8..6fa011a 100644 --- a/.github/workflows/agenda.yaml +++ b/.github/workflows/agenda.yaml @@ -3,8 +3,8 @@ name: Create meeting template on: workflow_dispatch: {} schedule: - # every two weeks on tuesday at 8AM PST (with DST) - - cron: '0 15 */14 * 2' + # every two weeks on tuesday at 10AM PST (with DST) + - cron: '0 17 */14 * 2' jobs: create-discussion: From 98a24a02abcf0dd1b3e27e926e30f82181b62eb7 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 21 Aug 2025 13:23:02 -0400 Subject: [PATCH 29/30] fix: removes un relevant time Signed-off-by: Vincent Biret --- .github/workflows/agenda.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agenda.yaml b/.github/workflows/agenda.yaml index 6fa011a..1d2a626 100644 --- a/.github/workflows/agenda.yaml +++ b/.github/workflows/agenda.yaml @@ -22,7 +22,7 @@ jobs: - name: Get Next Meeting Date id: get-next-meeting-date run: | - NEXT_MEETING_DATE=$(date -d "next Tuesday 08:00" +%Y-%m-%d) + NEXT_MEETING_DATE=$(date -d "next Tuesday" +%Y-%m-%d) echo "NEXT_MEETING_DATE=$NEXT_MEETING_DATE" >> $GITHUB_ENV - name: Create discussion with agenda id: create-repository-discussion From 69beab8a96a3798152bd51e4051e7b05cff31b80 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 14 Oct 2025 09:27:42 -0400 Subject: [PATCH 30/30] ci: adds code owners definition so people are notified of pull requests automatically --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..0467c00 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @oai/tsc \ No newline at end of file