From 76f184b5e7aa8bce1b1d2d3600a2649b4619af54 Mon Sep 17 00:00:00 2001 From: Alasdair Hurst Date: Tue, 25 Feb 2020 15:08:31 +0000 Subject: [PATCH 001/149] #2157: Update schema to validate refs in headers of encoding objects --- schemas/v3.0/schema.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index 13e47ff08d..b19f0a9669 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -1,4 +1,4 @@ -id: https://spec.openapis.org/oas/3.0/schema/2019-04-02 +id: https://spec.openapis.org/oas/3.0/schema/2020-02-25 $schema: http://json-schema.org/draft-04/schema# description: Validation schema for OpenAPI Specification 3.0.X. type: object @@ -987,7 +987,9 @@ definitions: headers: type: object additionalProperties: - $ref: '#/definitions/Header' + oneOf: + - $ref: '#/definitions/Header' + - $ref: '#/definitions/Reference' style: type: string enum: From 347f3610b45d6ec85bea72b42b5865199c561ddc Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 3 Jun 2021 17:15:24 +0100 Subject: [PATCH 002/149] scripts: add fwdport/fwdabort.sh for forward porting commits between branches (#2597) Signed-off-by: Mike Ralphson --- scripts/fwdabort.sh | 10 +++++ scripts/fwdport.sh | 100 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100755 scripts/fwdabort.sh create mode 100755 scripts/fwdport.sh diff --git a/scripts/fwdabort.sh b/scripts/fwdabort.sh new file mode 100755 index 0000000000..ccec20bfbe --- /dev/null +++ b/scripts/fwdabort.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Aborts a fwdport.sh run cleanly + +# Author: @MikeRalphson + +git am -i --abort +rm -f *.mbox *.patch *.rej +git checkout main + diff --git a/scripts/fwdport.sh b/scripts/fwdport.sh new file mode 100755 index 0000000000..efe20ca6ed --- /dev/null +++ b/scripts/fwdport.sh @@ -0,0 +1,100 @@ +#!/bin/sh + +# Forward ports changes from the spec file of a source branch to the spec file of a target branch +# For example: porting interim changes made in v3.1.x patch releases to the v3.2.0 branch + +# This script is designed to be run once per branch, when interim changes need merging in +# before another branch is released. It is not intended to be run multiple times to keep +# two branches in sync. + +# Author: @MikeRalphson +# Issues: https://github.com/OAI/OpenAPI-Specification/pull/2163 + +mainbranch=main +myremote=origin +upstream=upstream + +source=$1 +target=$2 + +if [ -z "$source" ]; then + echo You must specify a source and target branch + exit 1 +fi +if [ -z "$target" ]; then + echo You must specify a source and target branch + exit 1 +fi + +echo Checking working dir... +status=`git ls-files -m` +if [ -z "$status" ]; then + echo All clear +else + echo You have a dirty working tree, aborting + echo ${status} + exit 1 +fi + +cruft=`ls -1 *.patch *.rej *.mbox 2>/dev/null` +if [ -z "$cruft" ]; then + echo No .patch, .rej or .mbox files found, continuing +else + echo .patch / .rej / .mbox files found, aborting + exit 1 +fi + +tmpbranch=forward-port-${source} +existing=`git branch | grep ${tmpbranch}` +if [ -z "$existing" ]; then + echo No matching temp branch found, continuing +else + echo Temp branch ${tmpbranch} already exists, aborting + exit 1 +fi + +srcver=`echo $source | sed s/-dev//g | sed s/v//g`.md +tgtver=`echo $target | sed s/-dev//g | sed s/v//g`.md + +echo Forward-porting changes from ${source}:versions/${srcver} to ${target}:${tgtver} +echo You may use the commands \'git fwdskip\' and \'git fwdcont\' to skip patches, or to continue after manually fixing. +echo Use `fwdabort.sh` to abort cleanly. +echo +echo Due to a bug in \`git am\`, git v2.22.1+ is required, you\'re running: +git --version +echo +echo Press a key to continue... +read + +git config --add rerere.enabled true +git config alias.fwdskip '!git am -i --skip' +git config alias.fwdcont '!git am -i --continue' + +git checkout ${source} +git pull ${upstream} ${source} + +# look at using git merge-base as an alternative? say if we branched 3.1.0 part way through 3.0.2's life + +firstsrc=`git log --abbrev-commit --format=format:%H -n 1 --reverse -- versions/${srcver}` +lastsrc=`git log --abbrev-commit --format=format:%H -- versions/${srcver} | tail -n 1` +changes=`git log --format=format:%H --reverse versions/${srcver}` + +echo Applying changes from ${firstsrc} to ${lastsrc} + +# remove first (creation) commit and uniq without sorting +oIFS="$IFS" +IFS=' ' +changes=`echo ${changes} | tail -n +2 | awk '!x[$0]++'` +IFS="$oIFS" + +for c in ${changes}; do + git format-patch --stdout -1 $c | sed s/${srcver}/${tgtver}/g > $c.patch +done + +git checkout ${target} +git pull ${upstream} ${target} +git checkout -b ${tmpbranch} +cat *.patch > fwdport.mbox +rm -f *.patch +git am -3 --interactive --ignore-whitespace -s fwdport.mbox + From be7689486ebddb7c673c7799678910e0f1524e51 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 3 Jun 2021 17:37:26 +0100 Subject: [PATCH 003/149] Respec fix and SEO changes (#2603) * fix: v2.0 maintainers and version/date Signed-off-by: Mike Ralphson * Add some largely non-visible SEO improvements to the rendered spec Signed-off-by: Mike Ralphson --- .github/workflows/respec.yaml | 2 ++ scripts/md2html/build.sh | 3 +++ scripts/md2html/md2html.js | 43 ++++++++++++++++++++--------------- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.github/workflows/respec.yaml b/.github/workflows/respec.yaml index bfa286f72e..bc3a9e88d5 100644 --- a/.github/workflows/respec.yaml +++ b/.github/workflows/respec.yaml @@ -22,6 +22,8 @@ jobs: steps: - uses: actions/checkout@v2 # checkout main branch + with: + fetch-depth: 0 - name: Install dependencies run: npm i diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index 3ddf387c2e..c4c7a51e95 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -14,6 +14,7 @@ cp -p markdown/* ../../deploy/ 2> /dev/null node md2html.js --respec --maintainers ./history/MAINTAINERS_v2.0.md ../../versions/2.0.md > ../../deploy/oas/v2.0.html latest=`git describe --abbrev=0 --tags` +latestCopied=none for filename in ../../versions/[3456789].*.md ; do version=$(basename "$filename" .md) node md2html.js --respec --maintainers ../../MAINTAINERS.md ${filename} > ../../deploy/oas/v$version.html @@ -21,7 +22,9 @@ for filename in ../../versions/[3456789].*.md ; do if [[ ${version} != *"rc"* ]];then # version is not a Release Candidate cp -p ../../deploy/oas/v$version.html ../../deploy/oas/latest.html + latestCopied=v$version fi fi done +echo Latest tag is $latest, copied $latestCopied to latest.html diff --git a/scripts/md2html/md2html.js b/scripts/md2html/md2html.js index 26448d1081..23c66adac4 100644 --- a/scripts/md2html/md2html.js +++ b/scripts/md2html/md2html.js @@ -1,8 +1,6 @@ -/* bikeshed claims to support markdown syntax, but not (yet) commonmark. -ReSpec supports markdown formatting, but this shows up on the page before being rendered +/* ReSpec supports markdown formatting, but this shows up on the page before being rendered Hence we render the markdown to HTML ourselves, this gives us -complete control over formatting and syntax highlighting (where -highlight.js does a better job than bikeshed's Pygments) */ +complete control over formatting and syntax highlighting */ 'use strict'; @@ -19,9 +17,6 @@ const hljs = require('highlight.js'); const cheerio = require('cheerio'); let argv = require('yargs') - .boolean('bikeshed') - .alias('b','bikeshed') - .describe('bikeshed','Output in bikeshed format') .boolean('respec') .alias('r','respec') .describe('respec','Output in respec format') @@ -72,6 +67,11 @@ function preface(title,options) { }; let preface = `${md.utils.escapeHtml(title)}`; + + // SEO + preface += ''; + preface += ''; + if (options.respec) { preface += ''; preface += ``; @@ -91,7 +91,7 @@ function preface(title,options) { preface += fs.readFileSync(path.resolve(__dirname,'gist.css'),'utf8').split('\n').join(' '); preface += ''; preface += '
'; - preface += 'The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for REST APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.'; + preface += 'The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.'; preface += '
'; preface += '
'; preface += '

Status of This Document

'; @@ -121,15 +121,24 @@ function doMaintainers() { } function getPublishDate(m) { + let result = new Date(); let h = md.render(m); let $ = cheerio.load(h); - let t = $('tbody').last(); - let c = $(t).children('tr').children('td'); - let v = $(c[0]).text(); - let d = $(c[1]).text(); - argv.subtitle = v; - if (d === 'TBA') return new Date(); - return new Date(d); + $('table').each(function(i,table){ + const h = $(table).find('th'); + const headers = []; + $(h).each(function(i,header){ + headers.push($(header).text()); + }); + if (headers.length >= 2 && headers[0] === 'Version' && headers[1] === 'Date') { + let c = $(table).find('tr').find('td'); + let v = $(c[0]).text(); + let d = $(c[1]).text(); + argv.subtitle = v; + if (d !== 'TBA') result = new Date(d); + } + }); + return result; } if (argv.maintainers) { @@ -178,8 +187,6 @@ for (let l in lines) { let originalIndent = indent; let prevIndent = indents[indents.length-1]; // peek - - /* bikeshed is a bit of a pita when it comes to header nesting */ let delta = indent-prevIndent; if (!argv.respec) { @@ -301,7 +308,7 @@ for (let l in lines) { lines[l] = line; } -s = preface('OpenAPI Specification',argv)+'\n\n'+lines.join('\n'); +s = preface(`OpenAPI Specification v${argv.subtitle} | Introduction, Definitions, & More`,argv)+'\n\n'+lines.join('\n'); let out = md.render(s); out = out.replace(/\[([RGB])\]/g,function(match,group1){ console.warn('Fixing',match,group1); From 946f590590af84af7b90e09ecf20e0b345258ef7 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 10 Jun 2021 17:28:52 +0100 Subject: [PATCH 004/149] nuke proposal prefixes (#2604) * nuke proposal prefixes * Add YYYY-MM-DD prefixes to proposal documents Signed-off-by: Mike Ralphson --- ...ate.md => 2019-01-01-Proposal-Template.md} | 8 ++-- ...al.md => 2019-03-15-Alternative-Schema.md} | 10 ++--- ...002_Webhooks.md => 2019-07-17-Webhooks.md} | 2 +- ...able.md => 2019-10-31-Clarify-Nullable.md} | 2 +- ...004_Overlays.md => 2019-12-24-Overlays.md} | 2 +- proposals/Alternative Schema/DEVELOPMENT.md | 38 ------------------- .../CONTRIBUTORS.md | 0 .../alternative_schema_object.md} | 3 +- .../examples.md} | 0 .../implementations.md | 0 .../schema_object.md | 0 11 files changed, 14 insertions(+), 51 deletions(-) rename proposals/{000_OAS-proposal-template.md => 2019-01-01-Proposal-Template.md} (89%) rename proposals/{001_Alternative Schema Proposal.md => 2019-03-15-Alternative-Schema.md} (92%) rename proposals/{002_Webhooks.md => 2019-07-17-Webhooks.md} (98%) rename proposals/{003_Clarify-Nullable.md => 2019-10-31-Clarify-Nullable.md} (99%) rename proposals/{004_Overlays.md => 2019-12-24-Overlays.md} (98%) delete mode 100644 proposals/Alternative Schema/DEVELOPMENT.md rename proposals/{Alternative Schema => Alternative-Schema}/CONTRIBUTORS.md (100%) rename proposals/{Alternative Schema/alternative_schema_object.adoc => Alternative-Schema/alternative_schema_object.md} (98%) rename proposals/{Alternative Schema/alternative_schema_examples.md => Alternative-Schema/examples.md} (100%) rename proposals/{Alternative Schema => Alternative-Schema}/implementations.md (100%) rename proposals/{Alternative Schema => Alternative-Schema}/schema_object.md (100%) diff --git a/proposals/000_OAS-proposal-template.md b/proposals/2019-01-01-Proposal-Template.md similarity index 89% rename from proposals/000_OAS-proposal-template.md rename to proposals/2019-01-01-Proposal-Template.md index 799c73b491..aae45e00a5 100644 --- a/proposals/000_OAS-proposal-template.md +++ b/proposals/2019-01-01-Proposal-Template.md @@ -5,12 +5,12 @@ |Tag |Value | |---- | ---------------- | -|Proposal |[NNNN](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/{directory_or_file_name})| +|Proposal |[YYYY-MM-DD-Short-Name](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/{YYYY-MM-DD-Short-Name.md})| |Authors|[Author 1](https://github.com/{author1}), [Author 2](https://github.com/{author2})| -|Review Manager |TBD | +|Review Manager | TBD | |Status |Proposal, Draft, Promoted, or Abandoned| -|Implementations |[Click Here](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/{NNNN}/implementations.md)| -|Issues |[{issueid}](https://github.com/OAI/OpenAPI-Specification/issues/{Issueid})| +|Implementations |[Click Here](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/{YYYY-MM-DD-Short-Name}/implementations.md)| +|Issues |[{issueid}](https://github.com/OAI/OpenAPI-Specification/issues/{IssueId})| |Previous Revisions |[{revid}](https://github.com/OAI/OpenAPI-Specification/pull/{revid}) | ## Change Log diff --git a/proposals/001_Alternative Schema Proposal.md b/proposals/2019-03-15-Alternative-Schema.md similarity index 92% rename from proposals/001_Alternative Schema Proposal.md rename to proposals/2019-03-15-Alternative-Schema.md index a0faab8c06..0f196f273d 100644 --- a/proposals/001_Alternative Schema Proposal.md +++ b/proposals/2019-03-15-Alternative-Schema.md @@ -4,11 +4,11 @@ |Tag |Value | |---- | ---------------- | -|Proposal |[Alternative Schema](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/Alternative%20Schema)| -|Authors|[Chuck Heazel](https://github.com/{cmheazel})| +|Proposal |[Alternative Schema](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/2019-03-15-Alternative-Schema.md)| +|Authors|[Chuck Heazel](https://github.com/cmheazel)| |Review Manager |TBD | |Status |**Draft** | -|Implementations |[Click Here](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/Alternative%20Schema/implementations.md) +|Implementations |[Click Here](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/Alternative-Schema/implementations.md) |Issues |[1532](https://github.com/OAI/OpenAPI-Specification/issues/1532)| |Previous Revisions |[March 15](https://github.com/OAI/OpenAPI-Specification/pull/1868#issue-261689900) | @@ -16,8 +16,8 @@ |Date |Responsible Party |Description | |---- | ---------------- | ---------- | -|3/15/19 |C. Heazel|Initial Markup Draft | -|4/17/19 |C. Heazel|Re-structured based on Apple Swift| +|2019-03-15 |C. Heazel|Initial Markup Draft | +|2019-04-17 |C. Heazel|Re-structured based on Apple Swift| ## Introduction diff --git a/proposals/002_Webhooks.md b/proposals/2019-07-17-Webhooks.md similarity index 98% rename from proposals/002_Webhooks.md rename to proposals/2019-07-17-Webhooks.md index 3daf5aadff..58e6cd0bfa 100644 --- a/proposals/002_Webhooks.md +++ b/proposals/2019-07-17-Webhooks.md @@ -5,7 +5,7 @@ |Tag |Value | |---- | ---------------- | -|Proposal |[002_Webhooks](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/002_webhooks.md)| +|Proposal |[2019-07-17-Webhooks](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/2019-07-17-Webhooks.md)| |Authors|[Lorna Mitchell](https://github.com/lornajane)| |Review Manager |TBD | |Status |Proposal| diff --git a/proposals/003_Clarify-Nullable.md b/proposals/2019-10-31-Clarify-Nullable.md similarity index 99% rename from proposals/003_Clarify-Nullable.md rename to proposals/2019-10-31-Clarify-Nullable.md index 7e82c7b6ca..57a5b1ce64 100644 --- a/proposals/003_Clarify-Nullable.md +++ b/proposals/2019-10-31-Clarify-Nullable.md @@ -5,7 +5,7 @@ |Tag |Value | |---- | ---------------- | -|Proposal |[003](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/003_Clarify-Nullable.md)| +|Proposal |[2019-10-31-Clarify-Nullable](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/2019-10-31-Clarify-Nullable.md)| |Authors|[Ted Epstein](https://github.com/tedepstein)| |Review Manager |TBD| |Status |Proposal| diff --git a/proposals/004_Overlays.md b/proposals/2019-12-24-Overlays.md similarity index 98% rename from proposals/004_Overlays.md rename to proposals/2019-12-24-Overlays.md index 4c352804c0..26109be2da 100644 --- a/proposals/004_Overlays.md +++ b/proposals/2019-12-24-Overlays.md @@ -4,7 +4,7 @@ |Tag |Value | |---- | ---------------- | -|Proposal |[004_Overlays](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/004_overlays.md)| +|Proposal |[2019-12-24-Overlays](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/2019-12-24-Overlays.md)| |Authors|[Darrel Miller](https://github.com/darrelmiller)| |Status |Proposal| |Issues |[1442](https://github.com/OAI/OpenAPI-Specification/issues/1442) [1722](https://github.com/OAI/OpenAPI-Specification/issues/1722)| diff --git a/proposals/Alternative Schema/DEVELOPMENT.md b/proposals/Alternative Schema/DEVELOPMENT.md deleted file mode 100644 index 65ff4b1684..0000000000 --- a/proposals/Alternative Schema/DEVELOPMENT.md +++ /dev/null @@ -1,38 +0,0 @@ -## Development Guidelines - -TBD - -## Specification Driving factors - -TBD - -## Specification Change Criteria - -TBD - -## Specification Change Process - -TBD - -## Tracking Process - -* GitHub is the medium of record for all spec designs, use cases, and so on. - - -## Release Process - -TBD - -## Draft Features - - -## Transparency - - - -## Participation - - - -## Community Roles - diff --git a/proposals/Alternative Schema/CONTRIBUTORS.md b/proposals/Alternative-Schema/CONTRIBUTORS.md similarity index 100% rename from proposals/Alternative Schema/CONTRIBUTORS.md rename to proposals/Alternative-Schema/CONTRIBUTORS.md diff --git a/proposals/Alternative Schema/alternative_schema_object.adoc b/proposals/Alternative-Schema/alternative_schema_object.md similarity index 98% rename from proposals/Alternative Schema/alternative_schema_object.adoc rename to proposals/Alternative-Schema/alternative_schema_object.md index 011f26b6b6..a59451bce3 100644 --- a/proposals/Alternative Schema/alternative_schema_object.adoc +++ b/proposals/Alternative-Schema/alternative_schema_object.md @@ -6,7 +6,7 @@ The following text is to be inserted after the XML Object section This object makes it possible to reference an external file that contains a schema that does not follow the OAS specification. If tooling does not support the _type_, tooling MUST consider the content valid but SHOULD provide a warning that the alternative schema was not processed. -==== Fixed Fields +## Fixed Fields |Field Name | Type | Description | |---|:---:|---| @@ -14,3 +14,4 @@ This object makes it possible to reference an external file that contains a sche |location | url | **REQUIRED**. This is a absolute or relative reference to an external resource containing a schema of a known type. This reference may contain a fragment identifier to reference only a subset of an external document. | This object MAY be extended with Specification Extensions. + diff --git a/proposals/Alternative Schema/alternative_schema_examples.md b/proposals/Alternative-Schema/examples.md similarity index 100% rename from proposals/Alternative Schema/alternative_schema_examples.md rename to proposals/Alternative-Schema/examples.md diff --git a/proposals/Alternative Schema/implementations.md b/proposals/Alternative-Schema/implementations.md similarity index 100% rename from proposals/Alternative Schema/implementations.md rename to proposals/Alternative-Schema/implementations.md diff --git a/proposals/Alternative Schema/schema_object.md b/proposals/Alternative-Schema/schema_object.md similarity index 100% rename from proposals/Alternative Schema/schema_object.md rename to proposals/Alternative-Schema/schema_object.md From 3d2c0440ec1931dfc60e5f599219efaa48b51039 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 10 Jun 2021 17:30:53 +0100 Subject: [PATCH 005/149] Rendered spec, generate latest.html and add DOCTYPE (#2607) * fix: md2html/build.sh specify bash in shebang Signed-off-by: Mike Ralphson * fix: changes for abstract title in md2html.js Signed-off-by: Mike Ralphson --- scripts/md2html/build.sh | 7 +++++-- scripts/md2html/md2html.js | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index c4c7a51e95..13f5fc82f7 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -1,6 +1,9 @@ -#!/bin/sh +#!/bin/bash -# run this script from the root of the repo +# Author: @MikeRalphson + +# run this script from the root of the repo. It is designed to be run by a GitHub workflow. +# It contains bashisms mkdir -p deploy/oas mkdir -p deploy/js diff --git a/scripts/md2html/md2html.js b/scripts/md2html/md2html.js index 23c66adac4..b88309b45d 100644 --- a/scripts/md2html/md2html.js +++ b/scripts/md2html/md2html.js @@ -26,6 +26,7 @@ let argv = require('yargs') .describe('maintainers','path to MAINTAINERS.md') .require(1) .argv; +const abstract = 'What is the OpenAPI Specification?'; let maintainers = []; let emeritus = []; @@ -66,14 +67,14 @@ function preface(title,options) { includePermalinks: true }; - let preface = `${md.utils.escapeHtml(title)}`; + let preface = `${md.utils.escapeHtml(title)}`; // SEO preface += ''; preface += ''; if (options.respec) { - preface += ''; + preface += ''; preface += ``; preface += fs.readFileSync('./analytics/google.html','utf8'); preface += ''; @@ -90,7 +91,8 @@ function preface(title,options) { preface += 'pre { background-color: #f6f8fa !important; }'; preface += fs.readFileSync(path.resolve(__dirname,'gist.css'),'utf8').split('\n').join(' '); preface += ''; - preface += '
'; + preface += `

${title.split('|')[0]}

`; + preface += `
`; preface += 'The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.'; preface += '
'; preface += '
'; From fe41bac4d9f1674209a7e81b2f5a3f2d676cb701 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 10 Jun 2021 17:32:46 +0100 Subject: [PATCH 006/149] tests: add comments to expected failure cases (#2608) Signed-off-by: Mike Ralphson --- tests/v3.1/fail/no_containers.yaml | 5 ++++- tests/v3.1/fail/server_enum_empty.yaml | 3 +++ tests/v3.1/fail/servers.yaml | 3 +++ tests/v3.1/fail/unknown_container.yaml | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/v3.1/fail/no_containers.yaml b/tests/v3.1/fail/no_containers.yaml index 6cc86aae92..c158bcb2b6 100644 --- a/tests/v3.1/fail/no_containers.yaml +++ b/tests/v3.1/fail/no_containers.yaml @@ -1,4 +1,7 @@ -iopenapi: 3.1.0 +openapi: 3.1.0 + +# this example should fail as there are no paths, components or webhooks containers (at least one of which must be present) + info: title: API version: 1.0.0 diff --git a/tests/v3.1/fail/server_enum_empty.yaml b/tests/v3.1/fail/server_enum_empty.yaml index 62d751e171..cd6d30eb3e 100644 --- a/tests/v3.1/fail/server_enum_empty.yaml +++ b/tests/v3.1/fail/server_enum_empty.yaml @@ -1,4 +1,7 @@ openapi: 3.1.0 + +# this example should fail as the server variable enum is empty, and so does not contain the default value + info: title: API version: 1.0.0 diff --git a/tests/v3.1/fail/servers.yaml b/tests/v3.1/fail/servers.yaml index 7aaa05c0af..1470fe1ec8 100644 --- a/tests/v3.1/fail/servers.yaml +++ b/tests/v3.1/fail/servers.yaml @@ -1,4 +1,7 @@ openapi: 3.1.0 + +# this example should fail, as servers must be an array, not an object + info: title: API version: 1.0.0 diff --git a/tests/v3.1/fail/unknown_container.yaml b/tests/v3.1/fail/unknown_container.yaml index e0565f4a5a..7f31e86053 100644 --- a/tests/v3.1/fail/unknown_container.yaml +++ b/tests/v3.1/fail/unknown_container.yaml @@ -1,4 +1,7 @@ openapi: 3.1.0 + +# this example should fail as overlays is not a valid top-level object/keyword + info: title: API version: 1.0.0 From 851a6d18a08dc5700ddd761b6e130318d34e6708 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 10 Jun 2021 17:38:44 +0100 Subject: [PATCH 007/149] Add a GitHub workflow to run the metaschema tests (incl. boolean schemas) (#2614) * Add test cases for valid and invalid top-level schemaObject types Signed-off-by: Mike Ralphson * Update workflow actions to node 14 Signed-off-by: Mike Ralphson --- .github/workflows/schema-tests.yaml | 31 +++++++++++++++++++++++ .github/workflows/validate-markdown.yaml | 2 +- package.json | 3 +++ tests/v3.1/fail/invalid_schema_types.yaml | 13 ++++++++++ tests/v3.1/pass/valid_schema_types.yaml | 14 ++++++++++ tests/v3.1/test.js | 4 +-- 6 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/schema-tests.yaml create mode 100644 tests/v3.1/fail/invalid_schema_types.yaml create mode 100644 tests/v3.1/pass/valid_schema_types.yaml diff --git a/.github/workflows/schema-tests.yaml b/.github/workflows/schema-tests.yaml new file mode 100644 index 0000000000..11a699bf9e --- /dev/null +++ b/.github/workflows/schema-tests.yaml @@ -0,0 +1,31 @@ +name: schema-test + +# Author: @MikeRalphson / runs @jdesrosiers tests +# Issue: https://github.com/OAI/OpenAPI-Specification/pull/2489 + +# +# This workflow runs the npm test script to validate passing and failing +# testcases for the metaschema. +# + +# run this on push to any branch and creation of pull-requests +on: + push: {} + pull_request: {} + workflow_dispatch: {} + +jobs: + test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 # checkout repo content + - uses: actions/setup-node@v1 # setup Node.js + with: + node-version: '14.x' + - name: Install dependencies + run: npm i + - name: Run tests + run: npm run test + diff --git a/.github/workflows/validate-markdown.yaml b/.github/workflows/validate-markdown.yaml index 05af39ceaf..7cba565cd5 100644 --- a/.github/workflows/validate-markdown.yaml +++ b/.github/workflows/validate-markdown.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 # checkout repo content - uses: actions/setup-node@v1 # setup Node.js with: - node-version: '12.x' + node-version: '14.x' - name: Validate markdown run: npx mdv versions/3.*.md diff --git a/package.json b/package.json index ac2cac61d3..08cbfdd010 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "url": "https://github.com/OAI/OpenAPI-Specification.git" }, "license": "Apache-2.0", + "scripts": { + "test": "npx mocha tests/**/test.js" + }, "readmeFilename": "README.md", "files": [ "README.md", diff --git a/tests/v3.1/fail/invalid_schema_types.yaml b/tests/v3.1/fail/invalid_schema_types.yaml new file mode 100644 index 0000000000..d295b1f0ed --- /dev/null +++ b/tests/v3.1/fail/invalid_schema_types.yaml @@ -0,0 +1,13 @@ +openapi: 3.1.1 + +# this example shows invalid types for the schemaObject + +info: + title: API + version: 1.0.0 +components: + schemas: + invalid_null: null + invalid_number: 0 + invalid_array: [] + diff --git a/tests/v3.1/pass/valid_schema_types.yaml b/tests/v3.1/pass/valid_schema_types.yaml new file mode 100644 index 0000000000..4431adcda5 --- /dev/null +++ b/tests/v3.1/pass/valid_schema_types.yaml @@ -0,0 +1,14 @@ +openapi: 3.1.1 + +# this example shows that top-level schemaObjects MAY be booleans + +info: + title: API + version: 1.0.0 +components: + schemas: + anything_boolean: true + nothing_boolean: false + anything_object: {} + nothing_object: { not: {} } + diff --git a/tests/v3.1/test.js b/tests/v3.1/test.js index 5e7bf55692..8fef3a6543 100644 --- a/tests/v3.1/test.js +++ b/tests/v3.1/test.js @@ -17,7 +17,7 @@ before(async () => { metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2021-05-20"); }); -describe("Pass", () => { +describe("v3.1 Pass", () => { fs.readdirSync(`${__dirname}/pass`, { withFileTypes: true }) .filter((entry) => entry.isFile() && /\.yaml$/.test(entry.name)) .forEach((entry) => { @@ -32,7 +32,7 @@ describe("Pass", () => { }); }); -describe("Fail", () => { +describe("v3.1 Fail", () => { fs.readdirSync(`${__dirname}/fail`, { withFileTypes: true }) .filter((entry) => entry.isFile() && /\.yaml$/.test(entry.name)) .forEach((entry) => { From df62e1ef8e745d1b35887067380ae1124de52270 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 10 Jun 2021 18:21:42 +0100 Subject: [PATCH 008/149] Add accessible meetings slide to agenda template --- .github/templates/agenda.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/templates/agenda.md b/.github/templates/agenda.md index 590983c7ef..a8f08971fc 100644 --- a/.github/templates/agenda.md +++ b/.github/templates/agenda.md @@ -6,11 +6,14 @@ In order to give some more visibility into the topics we cover in the TDC meetin **Please submit comments below for topics or proposals that you wish to present in the TDC meeting** +![F10B5460-B4B3-4463-9CDE-C7F782202EA9](https://user-images.githubusercontent.com/21603/121568843-0b260900-ca18-11eb-9362-69fda4162be8.jpeg) + The agenda backlog is currently maintained in issue #2482 | Topic | Owner | Decision/NextStep | |-------|---------|---------| | | | | +Reports from Special Interest Groups | TDC | | AOB (see below) | TDC | | New issues / PRs labelled [review](https://github.com/OAI/OpenAPI-Specification/labels/review) | @OAI/triage | | [New issues](https://github.com/search?q=repo%3Aoai%2Fopenapi-specification+is%3Aissue+comments%3A0+no%3Alabel+is%3Aopen) without response yet | @OAI/triage | | From 8c547b2c61f4bdd7104201a2adc3b7d62d6e5cd1 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Fri, 11 Jun 2021 09:28:02 +0100 Subject: [PATCH 009/149] Make agenda workflow run on Mondays Makes the workflow trigger match the comment, thus giving people more time to add agenda items --- .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 d9c347ef31..b3bb617ce5 100644 --- a/.github/workflows/agenda.yaml +++ b/.github/workflows/agenda.yaml @@ -11,7 +11,7 @@ name: agenda on: schedule: - - cron: '0 9 * * 2' + - cron: '0 9 * * 1' workflow_dispatch: {} jobs: From 9d3895aef2b370f4d5be5f48f9ddcb8fbc773e7b Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Fri, 11 Jun 2021 09:36:21 +0100 Subject: [PATCH 010/149] Add code-of-conduct link to agenda template --- .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 a8f08971fc..38c630c9e9 100644 --- a/.github/templates/agenda.md +++ b/.github/templates/agenda.md @@ -1,6 +1,6 @@ **NOTE: This meeting is on Thursday at 9am - 10am PT** -Zoom Meeting link: [https://zoom.us/j/975841675](https://zoom.us/j/975841675?pwd=SUh4MjRLaEFKNlI3RElpWTdhRDVVUT09). Dial-in passcode: 763054 +Zoom Meeting link: [https://zoom.us/j/975841675](https://zoom.us/j/975841675?pwd=SUh4MjRLaEFKNlI3RElpWTdhRDVVUT09). Dial-in passcode: 763054 - [Code-of-Conduct](https://github.com/OAI/OpenAPI-Specification/blob/main/CODE_OF_CONDUCT.md#code-of-conduct) In order to give some more visibility into the topics we cover in the TDC meetings here is the planned agenda for the next meeting. Hopefully this will allow people to plan to attend meetings for topics that they have an interest in. And for folks who cannot attend they can comment on this issue prior to the meeting. Feel free to suggest other potential agenda topics. From 4b1433d5935ef251f2bb31680b4bcdf0be39f052 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Thu, 19 Aug 2021 18:47:10 +0200 Subject: [PATCH 011/149] Add scopes as required field of OAuth Flow Object (#2673) This makes metaschema consistent with the 3.0.x spec. Refs #2666 --- schemas/v3.0/schema.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index b19f0a9669..7c70ec8cab 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -1,4 +1,4 @@ -id: https://spec.openapis.org/oas/3.0/schema/2020-02-25 +id: https://spec.openapis.org/oas/3.0/schema/2021-08-12 $schema: http://json-schema.org/draft-04/schema# description: Validation schema for OpenAPI Specification 3.0.X. type: object @@ -892,6 +892,7 @@ definitions: type: object required: - tokenUrl + - scopes properties: tokenUrl: type: string @@ -911,6 +912,7 @@ definitions: type: object required: - tokenUrl + - scopes properties: tokenUrl: type: string @@ -931,6 +933,7 @@ definitions: required: - authorizationUrl - tokenUrl + - scopes properties: authorizationUrl: type: string From 92df7cacd80695a2b7aa56351dbef2b1a6fb6983 Mon Sep 17 00:00:00 2001 From: arfy slowy Date: Fri, 20 Aug 2021 16:13:15 +0700 Subject: [PATCH 012/149] fix: typo spelling grammar (#2670) * fix: typo spelling grammar * Update proposals/2019-07-17-Webhooks.md change ``request`` to ``requests`` Co-authored-by: Nate <37554478+servusdei2018@users.noreply.github.com> Co-authored-by: Nate <37554478+servusdei2018@users.noreply.github.com> --- proposals/2019-03-15-Alternative-Schema.md | 4 ++-- proposals/2019-07-17-Webhooks.md | 4 ++-- proposals/2019-12-24-Overlays.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/proposals/2019-03-15-Alternative-Schema.md b/proposals/2019-03-15-Alternative-Schema.md index 0f196f273d..de53463736 100644 --- a/proposals/2019-03-15-Alternative-Schema.md +++ b/proposals/2019-03-15-Alternative-Schema.md @@ -57,7 +57,7 @@ Values used to populate the Alternative Schema Object are required to come from *** Note this is a placeholder registry. Don't take the values seriously. *** -Inital contents of the registry will include: +Initial contents of the registry will include: |Name |Link |Description | |--- | --- | --- | @@ -69,5 +69,5 @@ This proposal makes use of the extensibility features of OpenAPI. All changes so ## Alternatives considered -Embedding non-JSON content in the OAS document would have imposed an unacceptable burden on tooling. Therefore, an extenal link was prefered. Considerable discussion was held over exactly how the links should be represented in the Schema Object. The selected option should support the greatest number of possible combinations of external schema that can be expressed with the OpenAPI schema language. +Embedding non-JSON content in the OAS document would have imposed an unacceptable burden on tooling. Therefore, an external link was preferred. Considerable discussion was held over exactly how the links should be represented in the Schema Object. The selected option should support the greatest number of possible combinations of external schema that can be expressed with the OpenAPI schema language. diff --git a/proposals/2019-07-17-Webhooks.md b/proposals/2019-07-17-Webhooks.md index 58e6cd0bfa..493b444451 100644 --- a/proposals/2019-07-17-Webhooks.md +++ b/proposals/2019-07-17-Webhooks.md @@ -19,7 +19,7 @@ ## Introduction -Modern APIs often consist of two-way API traffic, but OpenAPI currently only supports some types of requests. Standard client-to-server API calls are well supported. Server-to-client callbacks are only supported if they are the result of an earlier API call and are documented by nesting under the path of that earlier call. Incoming HTTP reqests ("webhooks") cannot be described in the current version of OpenAPI if they are the result of subscription arranged outside of the scope of the API (e.g. by setting a callback URL in a web interface). +Modern APIs often consist of two-way API traffic, but OpenAPI currently only supports some types of requests. Standard client-to-server API calls are well supported. Server-to-client callbacks are only supported if they are the result of an earlier API call and are documented by nesting under the path of that earlier call. Incoming HTTP requests ("webhooks") cannot be described in the current version of OpenAPI if they are the result of subscription arranged outside of the scope of the API (e.g. by setting a callback URL in a web interface). ## Motivation @@ -189,4 +189,4 @@ Adding a new top-level entry is not something to take lightly, however hopefully ## Alternatives considered -Another option is to add a special `path` that could contain the various webhooks using the exisiting `callback` syntax but existing tools which aren't expecting this special value may not handle it well, so this option was discounted. +Another option is to add a special `path` that could contain the various webhooks using the existing `callback` syntax but existing tools which aren't expecting this special value may not handle it well, so this option was discounted. diff --git a/proposals/2019-12-24-Overlays.md b/proposals/2019-12-24-Overlays.md index 26109be2da..7b9bc0cadf 100644 --- a/proposals/2019-12-24-Overlays.md +++ b/proposals/2019-12-24-Overlays.md @@ -52,7 +52,7 @@ This object contains identifying information about the [OpenAPI Overlay document Field Name | Type | Description ---|:---:|--- title | `string` | A human readable description of the purpose of the overlay. -version | `string` | A version identifer for indicating changes to an overlay document. +version | `string` | A version identifier for indicating changes to an overlay document. #### Update Object From 17ed07cb8bbd48e9b59b45737ada74d11c00324c Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 23 Sep 2021 09:16:34 -0700 Subject: [PATCH 013/149] Generate YAML versions of these schema documents (#2669) generated via: perl -MYAML::XS -MJSON::MaybeXS -we'$YAML::XS::Boolean="JSON::PP"; print Dump(JSON::MaybeXS->new->decode(do { local $/; <> }))' input.json > output.yaml --- schemas/v3.1/dialect/base.schema.yaml | 17 ++++++++ schemas/v3.1/meta/base.schema.yaml | 63 +++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 schemas/v3.1/dialect/base.schema.yaml create mode 100644 schemas/v3.1/meta/base.schema.yaml diff --git a/schemas/v3.1/dialect/base.schema.yaml b/schemas/v3.1/dialect/base.schema.yaml new file mode 100644 index 0000000000..8f1bf734cb --- /dev/null +++ b/schemas/v3.1/dialect/base.schema.yaml @@ -0,0 +1,17 @@ +--- +$dynamicAnchor: meta +$id: https://spec.openapis.org/oas/3.1/dialect/base +$schema: https://json-schema.org/draft/2020-12/schema +$vocabulary: + https://json-schema.org/draft/2020-12/vocab/applicator: true + https://json-schema.org/draft/2020-12/vocab/content: true + https://json-schema.org/draft/2020-12/vocab/core: true + https://json-schema.org/draft/2020-12/vocab/format-annotation: true + https://json-schema.org/draft/2020-12/vocab/meta-data: true + https://json-schema.org/draft/2020-12/vocab/unevaluated: true + https://json-schema.org/draft/2020-12/vocab/validation: true + https://spec.openapis.org/oas/3.1/vocab/base: false +allOf: +- $ref: https://json-schema.org/draft/2020-12/schema +- $ref: https://spec.openapis.org/oas/3.1/meta/base +title: OpenAPI 3.1 Schema Object Dialect diff --git a/schemas/v3.1/meta/base.schema.yaml b/schemas/v3.1/meta/base.schema.yaml new file mode 100644 index 0000000000..80a662a179 --- /dev/null +++ b/schemas/v3.1/meta/base.schema.yaml @@ -0,0 +1,63 @@ +--- +$defs: + discriminator: + $ref: '#/$defs/extensible' + properties: + mapping: + additionalProperties: + type: string + type: object + propertyName: + type: string + required: + - propertyName + type: object + unevaluatedProperties: false + extensible: + patternProperties: + ^x-: true + external-docs: + $ref: '#/$defs/extensible' + properties: + description: + type: string + url: + format: uri-reference + type: string + required: + - url + type: object + unevaluatedProperties: false + xml: + $ref: '#/$defs/extensible' + properties: + attribute: + type: boolean + name: + type: string + namespace: + format: uri + type: string + prefix: + type: string + wrapped: + type: boolean + type: object + unevaluatedProperties: false +$dynamicAnchor: meta +$id: https://spec.openapis.org/oas/3.1/meta/base +$schema: https://json-schema.org/draft/2020-12/schema +$vocabulary: + https://spec.openapis.org/oas/3.1/vocab/base: true +properties: + discriminator: + $ref: '#/$defs/discriminator' + example: true + externalDocs: + $ref: '#/$defs/external-docs' + xml: + $ref: '#/$defs/xml' +title: OAS Base vocabulary +type: +- object +- boolean From 9acd3dbe9c7c57218c7d14f0fc0b505e79220230 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 23 Sep 2021 09:22:00 -0700 Subject: [PATCH 014/149] minor simplification of v3.1 schema (#2671) * minor simplification of v3.1 schema "if the X property is present, then apply this constraint to property X" can be simplified by simply stating the constraint for property X. * add missing constraint to "header" https://spec.openapis.org/oas/v3.1.0#headerObject * allowEmptyValue and allowReserved don't make sense for headers * collapse single-item "enum"s in "cookie" and "header" to "const" --- schemas/v3.1/schema.json | 46 +++++++++++++++++----------------------- schemas/v3.1/schema.yaml | 30 +++++++++++--------------- 2 files changed, 32 insertions(+), 44 deletions(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 44fdbb92b8..cf0cf085d9 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -534,9 +534,7 @@ "properties": { "style": { "default": "simple", - "enum": [ - "simple" - ] + "const": "simple" } } } @@ -581,9 +579,7 @@ "properties": { "style": { "default": "form", - "enum": [ - "form" - ] + "const": "form" } } } @@ -934,40 +930,38 @@ "default": false, "type": "boolean" }, - "allowEmptyValue": { - "default": false, - "type": "boolean" + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content" } }, + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], "dependentSchemas": { "schema": { "properties": { "style": { "default": "simple", - "enum": [ - "simple" - ] + "const": "simple" }, "explode": { "default": false, "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" } }, "$ref": "#/$defs/examples" - }, - "content": { - "properties": { - "content": { - "$ref": "#/$defs/content" - } - } } }, "$ref": "#/$defs/specification-extensions", diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 39b90f34de..cec4b6b1ca 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -363,8 +363,7 @@ $defs: properties: style: default: simple - enum: - - simple + const: simple styles-for-query: if: @@ -394,8 +393,7 @@ $defs: properties: style: default: form - enum: - - form + const: form styles-for-form: if: @@ -634,29 +632,25 @@ $defs: deprecated: default: false type: boolean - allowEmptyValue: - default: false - type: boolean + schema: + $dynamicRef: '#meta' + content: + $ref: '#/$defs/content' + oneOf: + - required: + - schema + - required: + - content dependentSchemas: schema: properties: style: default: simple - enum: - - simple + const: simple explode: default: false type: boolean - allowReserved: - default: false - type: boolean - schema: - $dynamicRef: '#meta' $ref: '#/$defs/examples' - content: - properties: - content: - $ref: '#/$defs/content' $ref: '#/$defs/specification-extensions' unevaluatedProperties: false From 085be9400c3990d8f4f41140078bbec0f3939b89 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 23 Sep 2021 09:22:49 -0700 Subject: [PATCH 015/149] per the spec, the only allowed ranges are [12345]XX (#2690) https://spec.openapis.org/oas/v3.1.0#patterned-fields-0 --- schemas/v3.1/schema.json | 2 +- schemas/v3.1/schema.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index cf0cf085d9..1562450333 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -770,7 +770,7 @@ } }, "patternProperties": { - "^[1-5][0-9X]{2}$": { + "^[1-5](?:[0-9]{2}|XX)$": "$ref": "#/$defs/response-or-reference" } }, diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index cec4b6b1ca..9b865a7635 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -518,7 +518,7 @@ $defs: default: $ref: '#/$defs/response-or-reference' patternProperties: - '^[1-5][0-9X]{2}$': + '^[1-5](?:[0-9]{2}|XX)$': $ref: '#/$defs/response-or-reference' $ref: '#/$defs/specification-extensions' unevaluatedProperties: false From 866a4a25989b1a9673061ce9ba175fc9677dab6c Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 23 Sep 2021 09:24:26 -0700 Subject: [PATCH 016/149] Add "type" qualifier to ensure that "if" clauses fail properly (#2696) If the wrong type is used for a particular piece of data, then a bare "required" will validate as true, causing the "if" clause to be true, which can lead to confusing errors when the "then" schema then fires, instead of the error occurring at a higher position in the schema. --- schemas/v3.1/schema.json | 7 +++++++ schemas/v3.1/schema.yaml | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 1562450333..a12eaffcc2 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -316,6 +316,7 @@ }, "path-item-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] @@ -651,6 +652,7 @@ }, "request-body-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] @@ -807,6 +809,7 @@ }, "response-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] @@ -827,6 +830,7 @@ }, "callbacks-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] @@ -905,6 +909,7 @@ }, "link-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] @@ -969,6 +974,7 @@ }, "header-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] @@ -1190,6 +1196,7 @@ }, "security-scheme-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 9b865a7635..b09dfca3c9 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -219,6 +219,7 @@ $defs: path-item-or-reference: if: + type: object required: - $ref then: @@ -416,6 +417,7 @@ $defs: parameter-or-reference: if: + type: object required: - $ref then: @@ -440,6 +442,7 @@ $defs: request-body-or-reference: if: + type: object required: - $ref then: @@ -545,6 +548,7 @@ $defs: response-or-reference: if: + type: object required: - $ref then: @@ -560,6 +564,7 @@ $defs: callbacks-or-reference: if: + type: object required: - $ref then: @@ -583,6 +588,7 @@ $defs: example-or-reference: if: + type: object required: - $ref then: @@ -614,6 +620,7 @@ $defs: link-or-reference: if: + type: object required: - $ref then: @@ -656,6 +663,7 @@ $defs: header-or-reference: if: + type: object required: - $ref then: @@ -801,6 +809,7 @@ $defs: security-scheme-or-reference: if: + type: object required: - $ref then: From f6d3005349559d1db7edc74422542031f173191a Mon Sep 17 00:00:00 2001 From: Steven Livengood <29138716+hornworm61@users.noreply.github.com> Date: Thu, 23 Sep 2021 09:26:08 -0700 Subject: [PATCH 017/149] Treat security scheme as case insensitive (#2706) --- schemas/v3.0/schema.yaml | 6 ++++-- schemas/v3.1/schema.yaml | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index 7c70ec8cab..babc5c5f37 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -806,7 +806,8 @@ definitions: - description: Bearer properties: scheme: - enum: [bearer] + type: string + pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$ - description: Non Bearer not: @@ -814,7 +815,8 @@ definitions: properties: scheme: not: - enum: [bearer] + type: string + pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$ OAuth2SecurityScheme: type: object diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index b09dfca3c9..7dbbed8c13 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -767,7 +767,8 @@ $defs: type: const: http scheme: - const: bearer + type: string + pattern: ^[Bb][Ee][Aa][Rr][Ee][Rr]$ required: - type - scheme @@ -775,8 +776,6 @@ $defs: properties: bearerFormat: type: string - required: - - scheme type-oauth2: if: From 917d33022a4e33f435f9fec37e14c2348e8b7a9f Mon Sep 17 00:00:00 2001 From: Taylor Barnett Date: Thu, 23 Sep 2021 14:37:00 -0700 Subject: [PATCH 018/149] Add Code of Conduct Enforcement Guidelines (#2721) --- CODE_OF_CONDUCT.md | 51 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 37a9b6e40e..a87b404e6d 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -94,13 +94,50 @@ offender, banning the offender from various online spaces (temporary or permanent), removing the offender from an event with no refund, or other options deemed appropriate. -Further details of specific enforcement policies are currently being -drafted. When these details are completed we will post updates to our -website for transparency. - -Project maintainers who do not report possible incidents or follow -responses in good faith may face temporary or permanent repercussions as -determined by the Code of Conduct Committee. +Enforcement Guidelines +---------------------- + +The Code of Conduct committee will follow these Enforcement Guidelines in +determining the consequences for any action they deem in violation of this +Code of Conduct: + +#### 1. Correction +Community Impact: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +Consequence: A private, written warning from the Code of Conduct committee, +providing clarity around the nature of the violation and an explanation of +why the behavior was inappropriate. A public apology may be requested. + +#### 2. Warning +Community Impact: A violation through a single incident or series of +actions. + +Consequence: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction +with the Code of Conduct committee, for a specified period of time. This +includes avoiding interactions in community spaces as well as external +channels like social media. Violating these terms may lead to a temporary +or permanent ban. + +#### 3. Temporary Ban +Community Impact: A serious violation of community standards, including +sustained inappropriate behavior. + +Consequence: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No +public or private interaction with the people involved, including +unsolicited interaction with the Code of Conduct committee, is allowed +during this period. Violating these terms may lead to a permanent ban. + +#### 4. Permanent Ban +Community Impact: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of +an individual, or aggression toward or disparagement of classes of +individuals. + +Consequence: A permanent ban from any sort of public interaction +within the community. ### Events From 424e706cb8e4b60321d135eafc3740a394da67ca Mon Sep 17 00:00:00 2001 From: Hans Klunder Date: Fri, 24 Sep 2021 21:12:51 +0200 Subject: [PATCH 019/149] fix: invalid JSON in v3.1 schema (#2725) --- schemas/v3.1/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index a12eaffcc2..8788428d33 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -772,7 +772,7 @@ } }, "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": + "^[1-5](?:[0-9]{2}|XX)$": { "$ref": "#/$defs/response-or-reference" } }, From ce732af1094933d22a683d58dd3a50126896721c Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Mon, 27 Sep 2021 15:58:52 -0700 Subject: [PATCH 020/149] tighten up regex for path items (#2681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://spec.openapis.org/oas/v3.1.0#pathTemplating "The value for these path parameters MUST NOT contain any unescaped “generic syntax” characters described by [[!RFC3986]]: forward slashes (/), question marks (?), or hashes (#)." --- schemas/v3.1/schema.json | 3 +++ schemas/v3.1/schema.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 8788428d33..fe969143b9 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -503,6 +503,9 @@ }, "then": { "properties": { + "name": { + "pattern": "[^/#?]+$" + }, "style": { "default": "simple", "enum": [ diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 7dbbed8c13..aac4bab56b 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -342,6 +342,8 @@ $defs: - in then: properties: + name: + pattern: '[^/#?]+$' style: default: simple enum: From 413b1a88e443af04a58dd68905045e422bca7b1c Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Thu, 7 Oct 2021 09:16:44 -0700 Subject: [PATCH 021/149] Update 3.1 schema id for patch release (#2718) * Update 3.1 schema id for patch release * Generate JSON for new version of 3.1 schemas * Catchup v3.0 schema with #2158 * Catchup v3.0 schemas with #2673 * Catchup v3.0 schemas with #2706 * Update schema id for 3.0 release --- schemas/v3.0/schema.json | 32 ++++++++++++++++++++------------ schemas/v3.0/schema.yaml | 2 +- schemas/v3.1/schema-base.json | 6 +++--- schemas/v3.1/schema-base.yaml | 4 ++-- schemas/v3.1/schema.json | 14 +++++++------- schemas/v3.1/schema.yaml | 2 +- tests/v3.1/test.js | 2 +- 7 files changed, 35 insertions(+), 27 deletions(-) diff --git a/schemas/v3.0/schema.json b/schemas/v3.0/schema.json index 71808402f6..dadd2837eb 100644 --- a/schemas/v3.0/schema.json +++ b/schemas/v3.0/schema.json @@ -1,5 +1,5 @@ { - "id": "https://spec.openapis.org/oas/3.0/schema/2019-04-02", + "id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28", "$schema": "http://json-schema.org/draft-04/schema#", "description": "Validation schema for OpenAPI Specification 3.0.X.", "type": "object", @@ -1358,9 +1358,8 @@ "description": "Bearer", "properties": { "scheme": { - "enum": [ - "bearer" - ] + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" } } }, @@ -1374,9 +1373,8 @@ "properties": { "scheme": { "not": { - "enum": [ - "bearer" - ] + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" } } } @@ -1489,7 +1487,8 @@ "PasswordOAuthFlow": { "type": "object", "required": [ - "tokenUrl" + "tokenUrl", + "scopes" ], "properties": { "tokenUrl": { @@ -1516,7 +1515,8 @@ "ClientCredentialsFlow": { "type": "object", "required": [ - "tokenUrl" + "tokenUrl", + "scopes" ], "properties": { "tokenUrl": { @@ -1544,7 +1544,8 @@ "type": "object", "required": [ "authorizationUrl", - "tokenUrl" + "tokenUrl", + "scopes" ], "properties": { "authorizationUrl": { @@ -1628,7 +1629,14 @@ "headers": { "type": "object", "additionalProperties": { - "$ref": "#/definitions/Header" + "oneOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "$ref": "#/definitions/Reference" + } + ] } }, "style": { @@ -1651,4 +1659,4 @@ "additionalProperties": false } } -} \ No newline at end of file +} diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index babc5c5f37..2bee05d9a0 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -1,4 +1,4 @@ -id: https://spec.openapis.org/oas/3.0/schema/2021-08-12 +id: https://spec.openapis.org/oas/3.0/schema/2021-09-28 $schema: http://json-schema.org/draft-04/schema# description: Validation schema for OpenAPI Specification 3.0.X. type: object diff --git a/schemas/v3.1/schema-base.json b/schemas/v3.1/schema-base.json index 9796fa3851..03692f631a 100644 --- a/schemas/v3.1/schema-base.json +++ b/schemas/v3.1/schema-base.json @@ -1,7 +1,7 @@ { - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-05-20", + "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-09-28", "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-05-20", + "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-09-28", "properties": { "jsonSchemaDialect": { "$ref": "#/$defs/dialect" @@ -21,4 +21,4 @@ } } } -} +} \ No newline at end of file diff --git a/schemas/v3.1/schema-base.yaml b/schemas/v3.1/schema-base.yaml index a5f0d6bd80..59b43a8531 100644 --- a/schemas/v3.1/schema-base.yaml +++ b/schemas/v3.1/schema-base.yaml @@ -1,7 +1,7 @@ -$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-05-20' +$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-09-28' $schema: 'https://json-schema.org/draft/2020-12/schema' -$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-05-20' +$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28' properties: jsonSchemaDialect: $ref: '#/$defs/dialect' diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index fe969143b9..04940fcb34 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -1,5 +1,5 @@ { - "$id": "https://spec.openapis.org/oas/3.1/schema/2021-05-20", + "$id": "https://spec.openapis.org/oas/3.1/schema/2021-09-28", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { @@ -622,6 +622,7 @@ }, "parameter-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] @@ -865,6 +866,7 @@ }, "example-or-reference": { "if": { + "type": "object", "required": [ "$ref" ] @@ -1131,7 +1133,8 @@ "const": "http" }, "scheme": { - "const": "bearer" + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" } }, "required": [ @@ -1144,10 +1147,7 @@ "bearerFormat": { "type": "string" } - }, - "required": [ - "scheme" - ] + } } }, "type-oauth2": { @@ -1348,4 +1348,4 @@ } } } -} +} \ No newline at end of file diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index aac4bab56b..a36e69943a 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -1,4 +1,4 @@ -$id: 'https://spec.openapis.org/oas/3.1/schema/2021-05-20' +$id: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28' $schema: 'https://json-schema.org/draft/2020-12/schema' type: object diff --git a/tests/v3.1/test.js b/tests/v3.1/test.js index 8fef3a6543..5e9dc31104 100644 --- a/tests/v3.1/test.js +++ b/tests/v3.1/test.js @@ -14,7 +14,7 @@ before(async () => { JsonSchema.add(dialect); JsonSchema.add(vocabulary); JsonSchema.add(yaml.parse(fs.readFileSync(`${__dirname}/../../schemas/v3.1/schema.yaml`, "utf8"), { prettyErrors: true })); - metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2021-05-20"); + metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2021-09-28"); }); describe("v3.1 Pass", () => { From 6ba1577240b79c9f613c2ea8d745c6ef6c832e50 Mon Sep 17 00:00:00 2001 From: Neal Caidin Date: Thu, 7 Oct 2021 12:19:25 -0400 Subject: [PATCH 022/149] Create SPECIAL_INTEREST_GROUPS.md (#2686) 2nd attempt at this. Adding ".md" suffix. Intended to be a place for all our SIGs to better define who they are, how to join, expectations, etc. --- SPECIAL_INTEREST_GROUPS.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 SPECIAL_INTEREST_GROUPS.md diff --git a/SPECIAL_INTEREST_GROUPS.md b/SPECIAL_INTEREST_GROUPS.md new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/SPECIAL_INTEREST_GROUPS.md @@ -0,0 +1 @@ + From 20f4bf21f10d98a25861daedd6d1975765cbe73b Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 11 Nov 2021 09:20:17 -0800 Subject: [PATCH 023/149] schema fixes for the "parameter" and "header" objects (#2746) - name is required (for parameter) - the map under content must contain only one entry as per https://spec.openapis.org/oas/v3.1.0#fixed-fields-9 --- schemas/v3.1/schema.json | 9 +++++++-- schemas/v3.1/schema.yaml | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 04940fcb34..c7f0d2d67f 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -437,10 +437,13 @@ "$dynamicRef": "#meta" }, "content": { - "$ref": "#/$defs/content" + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 } }, "required": [ + "name", "in" ], "oneOf": [ @@ -944,7 +947,9 @@ "$dynamicRef": "#meta" }, "content": { - "$ref": "#/$defs/content" + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 } }, "oneOf": [ diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index a36e69943a..fcfde15c8f 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -307,7 +307,10 @@ $defs: $dynamicRef: '#meta' content: $ref: '#/$defs/content' + minProperties: 1 + maxProperties: 1 required: + - name - in oneOf: - required: @@ -645,6 +648,8 @@ $defs: $dynamicRef: '#meta' content: $ref: '#/$defs/content' + minProperties: 1 + maxProperties: 1 oneOf: - required: - schema From 9d2bc17657983160333f9a408626d41e61ecd483 Mon Sep 17 00:00:00 2001 From: Ilya Lavrov Date: Thu, 11 Nov 2021 22:21:03 +0500 Subject: [PATCH 024/149] Remove Koa2-OAS3 from IMPLEMENTATIONS.md (#2708) Project's url https://github.com/OverSpeedIO/koa2-oas3 shows 404. Can't find the project through google either. Looks like the project closed. --- IMPLEMENTATIONS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 868123c6cd..35dba1a860 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -63,7 +63,6 @@ These tools are not endorsed by the OAI. | Vert.x Web API Contract | [github/vert-x3/vertx-web](http://vertx.io/docs/#web) | Java, Kotlin, JavaScript, Groovy, Ruby, Ceylon & Scala | Create an API endpoint with Vert.x 3 and OpenAPI 3 with automatic requests validation | Fusio | [github/apioo/fusio](https://github.com/apioo/fusio) | PHP, JavaScript | Build API endpoints based on OpenAPI 3 | Modern | [github/modern-project/modern-ruby](https://github.com/modern-project/modern-ruby) | Ruby | OpenAPI 3-based Rack framework with automatic OAS generation and requests/response validation -| Koa2-OAS3 | [github/OverSpeedIO/koa2-oas3](https://github.com/OverSpeedIO/koa2-oas3) | Node.js | OpenAPI 3 request validation middleware for Koa2 based apps. | Exegesis | [github/exegesis-js/exegesis](https://github.com/exegesis-js/exegesis) | Node.js | OpenAPI 3 server-side framework for express and other frameworks. | PHP-CRUD-API | [github/mevdschee/php-crud-api](https://github.com/mevdschee/php-crud-api) | PHP | Automatic CRUD API with OpenAPI 3 docs | FastAPI | [github/tiangolo/fastapi](https://github.com/tiangolo/fastapi) | Python | OpenAPI 3 based, high performance, Python 3.6+ API framework with automatic data validation, serialization and great editor support. From 746b8305a19fb88a4ac88b927f4ed6310e5fe0d9 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Thu, 11 Nov 2021 17:24:51 +0000 Subject: [PATCH 025/149] Add RapiDoc to IMPLEMENTATIONS.md (#2683) Also normalize whitespace in table headers --- IMPLEMENTATIONS.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 35dba1a860..b4a05bf55f 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -6,8 +6,8 @@ These tools are not endorsed by the OAI. #### Low-Level tooling -| Title | Project Link | Language |Description | -|----------------|--------------|----------|---------------------| +| Title | Project Link | Language | Description | +|-------|--------------|----------|-------------| | swagger-parser | [github/swagger-api](https://github.com/swagger-api/swagger-parser) | Java | Swagger 1.0, 1.1, 1.2, 2.0 to OpenAPI Specification converter | | swagger-models | [github/swagger-api](https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-models) | Java | OpenAPI 3.0 Java Pojos | | springdoc-openapi | [github/springdoc/springdoc-openapi](https://github.com/springdoc/springdoc-openapi) | Java | Library that produces OpenAPI 3.x specification documentation for spring-boot applications. | @@ -29,8 +29,8 @@ These tools are not endorsed by the OAI. #### Editors -| Title | Project Link | Language |Description | -|----------------|--------------|----------|---------------------| +| Title | Project Link | Language | Description | +|-------|--------------|----------|-------------| | Visual Studio Code extension | [VS Code marketplace / OpenAPI (Swagger) editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi) | TypeScript | Extends VS Code to provide OpenAPI 2.0 and 3.0 navigation, code snippets, new API creation | | Apicurio Studio | [github/Apicurio/apicurio-studio](https://github.com/Apicurio/apicurio-studio) | Java/TypeScript | Web-Based **visual designer** for OpenAPI 2.0 and 3.0.0. | | KaiZen OpenAPI Editor | [github/RepreZen/KaiZen-OpenAPI-Editor](https://github.com/RepreZen/KaiZen-OpenAPI-Editor) | Java | Eclipse Editor for OpenAPI 2.0 and 3.0 | @@ -42,24 +42,27 @@ These tools are not endorsed by the OAI. #### User Interfaces -| Title | Project Link | Language |Description | -|----------------|--------------|----------|---------------------| +| Title | Project Link | Language | Description | +|-------|--------------|----------|-------------| | openapi-viewer | [github/koumoul/openapi-viewer](https://github.com/koumoul-dev/openapi-viewer) | Vue.js | Browse and test a REST API described with the OpenAPI 3.0 Specification. | | swagger-ui | [github/swagger-api](https://github.com/swagger-api/swagger-UI) | JavaScript | Web-Based interface for visualizing and testing OpenAPI\Swagger definitions | | lincoln | [github/temando/open-api-renderer](https://github.com/temando/open-api-renderer)| React.js| A React renderer for OpenAPI v3 | | WebSphere Liberty | [Download jar](https://developer.ibm.com/wasdev/downloads/) | JavaScript | Includes a native OpenAPI v3 UI which allows for customization of its banners and URL | | Widdershins | [github/Mermade/widdershins](https://github.com/Mermade/widdershins) | Node.js | Generate Slate/Shins markdown from OpenAPI 3.0.x | | angular-swagger-ui | [github/angular-swagger-ui](https://github.com/Orange-OpenSource/angular-swagger-ui) | AngularJS | An angularJS implementation of Swagger UI | -| Redoc | [github/Redocly/redoc](https://github.com/Redocly/redoc) | JavaScript | A React-based renderer with deep support for OAS v2 and v3 and zero dev-dependency| +| Redoc | [github/Redocly/redoc](https://github.com/Redocly/redoc) | JavaScript | A React-based renderer with deep support for OAS v2 and v3 and zero dev-dependency | +| RapiDoc | [github/mrin9/RapiDoc](https://github.com/mrin9/RapiDoc) | JavaScript | A highly customizable Web Component for viewing Swagger and OpenAPI definitions | #### Mock Servers -| Title | Project Link | Language | Description | -| -------------- | ------------ | -------- | ----------- | + +| Title | Project Link | Language | Description | +|-------|--------------|----------|-------------| | API Sprout | [github/danielgtaylor/apisprout](https://github.com/danielgtaylor/apisprout) | Go | Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation | #### Server Implementations -| Title | Project Link | Language |Description | -|----------------|--------------|----------|---------------------| + +| Title | Project Link | Language | Description | +|-------|--------------|----------|-------------| | Vert.x Web API Contract | [github/vert-x3/vertx-web](http://vertx.io/docs/#web) | Java, Kotlin, JavaScript, Groovy, Ruby, Ceylon & Scala | Create an API endpoint with Vert.x 3 and OpenAPI 3 with automatic requests validation | Fusio | [github/apioo/fusio](https://github.com/apioo/fusio) | PHP, JavaScript | Build API endpoints based on OpenAPI 3 | Modern | [github/modern-project/modern-ruby](https://github.com/modern-project/modern-ruby) | Ruby | OpenAPI 3-based Rack framework with automatic OAS generation and requests/response validation @@ -71,15 +74,15 @@ These tools are not endorsed by the OAI. #### Client Implementations -| Title | Project Link | Language | Description | -|----------------|--------------|----------|-------------| +| Title | Project Link | Language | Description | +|-------|--------------|----------|-------------| | Scorpio | [github/notEthan/scorpio](https://github.com/notEthan/Scorpio) | Ruby | OpenAPI 2 and 3 implementation offering a HTTP client library | | openapi-client-axios | [github/anttiviljami/openapi-client-axios](https://github.com/anttiviljami/openapi-client-axios) | JavaScript, TypeScript | JavaScript client library for consuming OpenAPI-enabled APIs with axios. Types included. #### Code Generators -| Title | Project Link | Language |Description | -|----------------|--------------|----------|---------------------| +| Title | Project Link | Language | Description | +|-------|--------------|----------|-------------| | baucis-openapi3 | [github/metadevpro/baucis-openapi3](https://github.com/metadevpro/baucis-openapi3) | Node.js | [Baucis.js](https://github.com/wprl/baucis) plugin for generating OpenAPI 3.0 compliant API contracts. | | Google Gnostic | [github/googleapis/gnostic](https://github.com/googleapis/gnostic) | Go | Compile OpenAPI descriptions into equivalent Protocol Buffer representations. | | Gen | [github/wzshiming/gen](https://github.com/wzshiming/gen) | Go | Generate OpenAPI 3, client, and route based on golang source code. | From 3aaace7120151768a87843fad93561e8c39fbbe0 Mon Sep 17 00:00:00 2001 From: Alexey Stavrov Date: Thu, 11 Nov 2021 22:31:04 +0500 Subject: [PATCH 026/149] added JSONSchema::Validator to implementations list (#2659) --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index b4a05bf55f..9dc0646e8f 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -71,6 +71,7 @@ These tools are not endorsed by the OAI. | FastAPI | [github/tiangolo/fastapi](https://github.com/tiangolo/fastapi) | Python | OpenAPI 3 based, high performance, Python 3.6+ API framework with automatic data validation, serialization and great editor support. | Fastify OpenAPI v3 | [gitlab.com/m03geek/fastify-oas](https://gitlab.com/m03geek/fastify-oas) | Node.JS | Fastify OpenAPI v3+ plugin. Generates OpenAPI specification from fastify schemas and routes. Also serves swagger ui and spec in json/yaml formats. | openapi-backend | [github/anttiviljami/openapi-backend](https://github.com/anttiviljami/openapi-backend) | Node.js, TypeScript | Build, Validate, Route, and Mock in the backend using OpenAPI v3 spec in your favourite framework +| JSONSchema::Validator | [https://github.com/skbkontur/perl-jsonschema-validator](https://github.com/skbkontur/perl-jsonschema-validator) | Perl | OpenAPI 3 request/response validation #### Client Implementations From 5984314ac209b477060778ddcfc660099ea9c674 Mon Sep 17 00:00:00 2001 From: Dmitry Dygalo Date: Thu, 11 Nov 2021 18:54:13 +0100 Subject: [PATCH 027/149] Add Schemathesis to the "Testing tools" section (#2553) --- IMPLEMENTATIONS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 9dc0646e8f..a87db2ec14 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -59,6 +59,11 @@ These tools are not endorsed by the OAI. |-------|--------------|----------|-------------| | API Sprout | [github/danielgtaylor/apisprout](https://github.com/danielgtaylor/apisprout) | Go | Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation | +#### Testing tools +| Title | Project Link | Language | Description | +| -------------- | ------------ | -------- | ----------- | +| Schemathesis | [github/schemathesis/schemathesis](https://github.com/schemathesis/schemathesis) | Python | A modern API testing tool for web applications built with OpenAPI and GraphQL specifications | + #### Server Implementations | Title | Project Link | Language | Description | From 19748806c5c5a65d24ada545a1ac4f20d6ff4ea9 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 11 Nov 2021 17:57:11 +0000 Subject: [PATCH 028/149] examples: add non-oauth-scopes.yaml, refs #2407 (#2515) Signed-off-by: Mike Ralphson --- examples/v3.1/non-oauth-scopes.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/v3.1/non-oauth-scopes.yaml diff --git a/examples/v3.1/non-oauth-scopes.yaml b/examples/v3.1/non-oauth-scopes.yaml new file mode 100644 index 0000000000..e757452f38 --- /dev/null +++ b/examples/v3.1/non-oauth-scopes.yaml @@ -0,0 +1,19 @@ +openapi: 3.1.0 +info: + title: Non-oAuth Scopes example + version: 1.0.0 +paths: + /users: + get: + security: + - bearerAuth: + - 'read:users' + - 'public' +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: jwt + description: 'note: non-oauth scopes are not defined at the securityScheme level' + From 99f8331af532e93d2de59911920a920d3b6f39f9 Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Thu, 11 Nov 2021 21:30:05 +0100 Subject: [PATCH 029/149] Add implementations (#2469) --- IMPLEMENTATIONS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index a87db2ec14..f331acf9e9 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -22,6 +22,7 @@ These tools are not endorsed by the OAI. | go-openapi | [github/nasa9084/go-openapi](https://github.com/nasa9084/go-openapi) | Go | Golang struct model for OpenAPI 3.x. | | openapi | [github/wzshiming/openapi](https://github.com/wzshiming/openapi) | Go | OpenAPI 3 Specification for golang | | kin-openapi | [github/getkin/kin-openapi](https://github.com/getkin/kin-openapi) | Go | OpenAPI 3.x implementation for Go (parsing, converting, validation) | +| openapi-go | [github/swaggest/openapi-go](https://github.com/swaggest/openapi-go) | Go | Type-safe OpenAPI 3.x bindings and generator from code | | Spectral | [github/stoplightio/spectral](https://github.com/stoplightio/spectral) | TypeScript, JavaScript | A flexible JSON object linter with out of the box support for OpenAPI Specification 2 and 3 | | openapi-validator | [gitlab/mmal/openapi-validator](https://gitlab.com/mmalawski/openapi-validator) | PHP | Validates response against OpenAPI schema | | OpenAPI-Delphi | [github/paolo-rossi/OpenAPI-Delphi](https://github.com/paolo-rossi/OpenAPI-Delphi) | Delphi | Delphi implementation of a generator, parser and validator for the OpenAPI 3 Specification | @@ -77,6 +78,7 @@ These tools are not endorsed by the OAI. | Fastify OpenAPI v3 | [gitlab.com/m03geek/fastify-oas](https://gitlab.com/m03geek/fastify-oas) | Node.JS | Fastify OpenAPI v3+ plugin. Generates OpenAPI specification from fastify schemas and routes. Also serves swagger ui and spec in json/yaml formats. | openapi-backend | [github/anttiviljami/openapi-backend](https://github.com/anttiviljami/openapi-backend) | Node.js, TypeScript | Build, Validate, Route, and Mock in the backend using OpenAPI v3 spec in your favourite framework | JSONSchema::Validator | [https://github.com/skbkontur/perl-jsonschema-validator](https://github.com/skbkontur/perl-jsonschema-validator) | Perl | OpenAPI 3 request/response validation +| rest | [github.com/swaggest/rest](https://github.com/swaggest/rest) | Go | API server with automatic request/response mapping/validation and OpenAPI schema #### Client Implementations @@ -99,3 +101,4 @@ These tools are not endorsed by the OAI. | swagger-node-codegen | [github/fmvilas/swagger-node-codegen](https://github.com/fmvilas/swagger-node-codegen) | Node.js | Generates a Node.js/express server, but also has a template engine for creating any templates needed. | .NET-C#-Annotations | [github/Microsoft/OpenAPI-NET-CSharpAnnotations](https://github.com/Microsoft/OpenAPI.NET.CSharpAnnotations) | dotnet | Convert your native C# comments/annotation XML from your API code into a OpenAPI document object. | | Object Oriented OpenAPI Specification | [github/goldspecdigital/oooas](https://github.com/goldspecdigital/oooas) | PHP | Generates OpenAPI documents using PHP. | +| swac | [github.com/swaggest/swac](https://github.com/swaggest/swac) | PHP, Go | Generates clients for Go and PHP from OpenAPI 2/3. | \ No newline at end of file From a8bd1a502a5de5050282b95cc96b6738cb0c418a Mon Sep 17 00:00:00 2001 From: Andrew Hoglund Date: Thu, 18 Nov 2021 11:10:00 -0600 Subject: [PATCH 030/149] Change server-variable property to 'description' (#2793) * Change server-variable property to 'description' According to the spec: https://spec.openapis.org/oas/v3.1.0#server-variable-object This should validate a `description` field, not `descriptions`. * Update schema.yaml --- schemas/v3.1/schema.json | 4 ++-- schemas/v3.1/schema.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index c7f0d2d67f..4b477dd9ae 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -189,7 +189,7 @@ "default": { "type": "string" }, - "descriptions": { + "description": { "type": "string" } }, @@ -1353,4 +1353,4 @@ } } } -} \ No newline at end of file +} diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index fcfde15c8f..392e5942a4 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -130,7 +130,7 @@ $defs: minItems: 1 default: type: string - descriptions: + description: type: string required: - default From a114313cf1558877bce771bdad7d3b095a4f48f5 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 18 Nov 2021 09:11:40 -0800 Subject: [PATCH 031/149] reference the relevant section of the spec in definitions (#2792) --- schemas/v3.1/schema.json | 27 +++++++++++++++++++++++++++ schemas/v3.1/schema.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 4b477dd9ae..295029fb14 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -74,6 +74,7 @@ "unevaluatedProperties": false, "$defs": { "info": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#info-object", "type": "object", "properties": { "title": { @@ -106,6 +107,7 @@ "unevaluatedProperties": false }, "contact": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#contact-object", "type": "object", "properties": { "name": { @@ -122,6 +124,7 @@ "unevaluatedProperties": false }, "license": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#license-object", "type": "object", "properties": { "name": { @@ -154,6 +157,7 @@ "unevaluatedProperties": false }, "server": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#server-object", "type": "object", "properties": { "url": { @@ -177,6 +181,7 @@ "unevaluatedProperties": false }, "server-variable": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#server-variable-object", "type": "object", "properties": { "enum": { @@ -200,6 +205,7 @@ "unevaluatedProperties": false }, "components": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#components-object", "type": "object", "properties": { "schemas": { @@ -275,6 +281,7 @@ "unevaluatedProperties": false }, "paths": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#paths-object", "type": "object", "patternProperties": { "^/": { @@ -285,6 +292,7 @@ "unevaluatedProperties": false }, "path-item": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#path-item-object", "type": "object", "properties": { "summary": { @@ -329,6 +337,7 @@ } }, "operation": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#operation-object", "type": "object", "properties": { "tags": { @@ -388,6 +397,7 @@ "unevaluatedProperties": false }, "external-documentation": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#external-documentation-object", "type": "object", "properties": { "description": { @@ -405,6 +415,7 @@ "unevaluatedProperties": false }, "parameter": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#parameter-object", "type": "object", "properties": { "name": { @@ -638,6 +649,7 @@ } }, "request-body": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#request-body-object", "type": "object", "properties": { "description": { @@ -672,6 +684,7 @@ } }, "content": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#fixed-fields-10", "type": "object", "additionalProperties": { "$ref": "#/$defs/media-type" @@ -681,6 +694,7 @@ } }, "media-type": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#media-type-object", "type": "object", "properties": { "schema": { @@ -704,6 +718,7 @@ "unevaluatedProperties": false }, "encoding": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#encoding-object", "type": "object", "properties": { "contentType": { @@ -772,6 +787,7 @@ } }, "responses": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#responses-object", "type": "object", "properties": { "default": { @@ -787,6 +803,7 @@ "unevaluatedProperties": false }, "response": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#response-object", "type": "object", "properties": { "description": { @@ -829,6 +846,7 @@ } }, "callbacks": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#callback-object", "type": "object", "$ref": "#/$defs/specification-extensions", "additionalProperties": { @@ -850,6 +868,7 @@ } }, "example": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#example-object", "type": "object", "properties": { "summary": { @@ -882,6 +901,7 @@ } }, "link": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#link-object", "type": "object", "properties": { "operationRef": { @@ -930,6 +950,7 @@ } }, "header": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#header-object", "type": "object", "properties": { "description": { @@ -997,6 +1018,7 @@ } }, "tag": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#tag-object", "type": "object", "properties": { "name": { @@ -1016,6 +1038,7 @@ "unevaluatedProperties": false }, "reference": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#reference-object", "type": "object", "properties": { "$ref": { @@ -1032,6 +1055,7 @@ "unevaluatedProperties": false }, "schema": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#schema-object", "$dynamicAnchor": "meta", "type": [ "object", @@ -1039,6 +1063,7 @@ ] }, "security-scheme": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#security-scheme-object", "type": "object", "properties": { "type": { @@ -1322,6 +1347,7 @@ } }, "security-requirement": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#security-requirement-object", "type": "object", "additionalProperties": { "type": "array", @@ -1331,6 +1357,7 @@ } }, "specification-extensions": { + "$comment": "https://spec.openapis.org/oas/v3.1.0#specification-extensions", "patternProperties": { "^x-": true } diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 392e5942a4..49c7a52cf5 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -49,6 +49,7 @@ unevaluatedProperties: false $defs: info: + $comment: https://spec.openapis.org/oas/v3.1.0#info-object type: object properties: title: @@ -72,6 +73,7 @@ $defs: unevaluatedProperties: false contact: + $comment: https://spec.openapis.org/oas/v3.1.0#contact-object type: object properties: name: @@ -84,6 +86,7 @@ $defs: unevaluatedProperties: false license: + $comment: https://spec.openapis.org/oas/v3.1.0#license-object type: object properties: name: @@ -104,6 +107,7 @@ $defs: unevaluatedProperties: false server: + $comment: https://spec.openapis.org/oas/v3.1.0#server-object type: object properties: url: @@ -121,6 +125,7 @@ $defs: unevaluatedProperties: false server-variable: + $comment: https://spec.openapis.org/oas/v3.1.0#server-variable-object type: object properties: enum: @@ -138,6 +143,7 @@ $defs: unevaluatedProperties: false components: + $comment: https://spec.openapis.org/oas/v3.1.0#components-object type: object properties: schemas: @@ -189,6 +195,7 @@ $defs: unevaluatedProperties: false paths: + $comment: https://spec.openapis.org/oas/v3.1.0#paths-object type: object patternProperties: '^/': @@ -197,6 +204,7 @@ $defs: unevaluatedProperties: false path-item: + $comment: https://spec.openapis.org/oas/v3.1.0#path-item-object type: object properties: summary: @@ -228,6 +236,7 @@ $defs: $ref: '#/$defs/path-item' operation: + $comment: https://spec.openapis.org/oas/v3.1.0#operation-object type: object properties: tags: @@ -269,6 +278,7 @@ $defs: unevaluatedProperties: false external-documentation: + $comment: https://spec.openapis.org/oas/v3.1.0#external-documentation-object type: object properties: description: @@ -282,6 +292,7 @@ $defs: unevaluatedProperties: false parameter: + $comment: https://spec.openapis.org/oas/v3.1.0#parameter-object type: object properties: name: @@ -431,6 +442,7 @@ $defs: $ref: '#/$defs/parameter' request-body: + $comment: https://spec.openapis.org/oas/v3.1.0#request-body-object type: object properties: description: @@ -456,6 +468,7 @@ $defs: $ref: '#/$defs/request-body' content: + $comment: https://spec.openapis.org/oas/v3.1.0#fixed-fields-10 type: object additionalProperties: $ref: '#/$defs/media-type' @@ -463,6 +476,7 @@ $defs: format: media-range media-type: + $comment: https://spec.openapis.org/oas/v3.1.0#media-type-object type: object properties: schema: @@ -477,6 +491,7 @@ $defs: unevaluatedProperties: false encoding: + $comment: https://spec.openapis.org/oas/v3.1.0#encoding-object type: object properties: contentType: @@ -521,6 +536,7 @@ $defs: default: false responses: + $comment: https://spec.openapis.org/oas/v3.1.0#responses-object type: object properties: default: @@ -532,6 +548,7 @@ $defs: unevaluatedProperties: false response: + $comment: https://spec.openapis.org/oas/v3.1.0#response-object type: object properties: description: @@ -562,6 +579,7 @@ $defs: $ref: '#/$defs/response' callbacks: + $comment: https://spec.openapis.org/oas/v3.1.0#callback-object type: object $ref: '#/$defs/specification-extensions' additionalProperties: @@ -578,6 +596,7 @@ $defs: $ref: '#/$defs/callbacks' example: + $comment: https://spec.openapis.org/oas/v3.1.0#example-object type: object properties: summary: @@ -602,6 +621,7 @@ $defs: $ref: '#/$defs/example' link: + $comment: https://spec.openapis.org/oas/v3.1.0#link-object type: object properties: operationRef: @@ -634,6 +654,7 @@ $defs: $ref: '#/$defs/link' header: + $comment: https://spec.openapis.org/oas/v3.1.0#header-object type: object properties: description: @@ -679,6 +700,7 @@ $defs: $ref: '#/$defs/header' tag: + $comment: https://spec.openapis.org/oas/v3.1.0#tag-object type: object properties: name: @@ -693,6 +715,7 @@ $defs: unevaluatedProperties: false reference: + $comment: https://spec.openapis.org/oas/v3.1.0#reference-object type: object properties: $ref: @@ -705,12 +728,14 @@ $defs: unevaluatedProperties: false schema: + $comment: https://spec.openapis.org/oas/v3.1.0#schema-object $dynamicAnchor: meta type: - object - boolean security-scheme: + $comment: https://spec.openapis.org/oas/v3.1.0#security-scheme-object type: object properties: type: @@ -902,6 +927,7 @@ $defs: unevaluatedProperties: false security-requirement: + $comment: https://spec.openapis.org/oas/v3.1.0#security-requirement-object type: object additionalProperties: type: array @@ -909,6 +935,7 @@ $defs: type: string specification-extensions: + $comment: https://spec.openapis.org/oas/v3.1.0#specification-extensions patternProperties: '^x-': true From ba59ea1b42dbdab14e1be0662efe14bd3e75c9da Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Thu, 18 Nov 2021 17:23:10 +0000 Subject: [PATCH 032/149] IMPLEMENTATIONS.md: Restore table header format (#2787) Following the standardization of the table headers' formatting in 746b830, a slight deviation was reintroduced in 5984314. This commit re-normalizes the headers so they're consistent again. --- IMPLEMENTATIONS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index f331acf9e9..f99993cc72 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -61,8 +61,8 @@ These tools are not endorsed by the OAI. | API Sprout | [github/danielgtaylor/apisprout](https://github.com/danielgtaylor/apisprout) | Go | Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation | #### Testing tools -| Title | Project Link | Language | Description | -| -------------- | ------------ | -------- | ----------- | +| Title | Project Link | Language | Description | +| ------|--------------|----------|-------------| | Schemathesis | [github/schemathesis/schemathesis](https://github.com/schemathesis/schemathesis) | Python | A modern API testing tool for web applications built with OpenAPI and GraphQL specifications | #### Server Implementations @@ -101,4 +101,4 @@ These tools are not endorsed by the OAI. | swagger-node-codegen | [github/fmvilas/swagger-node-codegen](https://github.com/fmvilas/swagger-node-codegen) | Node.js | Generates a Node.js/express server, but also has a template engine for creating any templates needed. | .NET-C#-Annotations | [github/Microsoft/OpenAPI-NET-CSharpAnnotations](https://github.com/Microsoft/OpenAPI.NET.CSharpAnnotations) | dotnet | Convert your native C# comments/annotation XML from your API code into a OpenAPI document object. | | Object Oriented OpenAPI Specification | [github/goldspecdigital/oooas](https://github.com/goldspecdigital/oooas) | PHP | Generates OpenAPI documents using PHP. | -| swac | [github.com/swaggest/swac](https://github.com/swaggest/swac) | PHP, Go | Generates clients for Go and PHP from OpenAPI 2/3. | \ No newline at end of file +| swac | [github.com/swaggest/swac](https://github.com/swaggest/swac) | PHP, Go | Generates clients for Go and PHP from OpenAPI 2/3. | From a48adb94a88488d70671d1033454afeb0ab17403 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Nov 2021 10:23:53 -0700 Subject: [PATCH 033/149] Update JSON example files (#2786) Co-authored-by: webron --- examples/v3.1/non-oauth-scopes.json | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 examples/v3.1/non-oauth-scopes.json diff --git a/examples/v3.1/non-oauth-scopes.json b/examples/v3.1/non-oauth-scopes.json new file mode 100644 index 0000000000..b3e5990426 --- /dev/null +++ b/examples/v3.1/non-oauth-scopes.json @@ -0,0 +1,31 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Non-oAuth Scopes example", + "version": "1.0.0" + }, + "paths": { + "/users": { + "get": { + "security": [ + { + "bearerAuth": [ + "read:users", + "public" + ] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "jwt", + "description": "note: non-oauth scopes are not defined at the securityScheme level" + } + } + } +} \ No newline at end of file From f3ffc7962a30ff593f4a6540fe60627e55872c14 Mon Sep 17 00:00:00 2001 From: Ted Epstein Date: Thu, 18 Nov 2021 12:42:38 -0500 Subject: [PATCH 034/149] Update Proposal 003 "Clarify Nullable" to Promoted status (#2529) * Update Proposals 003 "Clarify Nullable" to approved status The proposal was adopted in OpenAPI version 3.0.3. This pull request updates the proposal with that status change. * Conformance with the standard proposal format. Changed status to 'Promoted' in accordance with the proposal template. --- proposals/2019-10-31-Clarify-Nullable.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proposals/2019-10-31-Clarify-Nullable.md b/proposals/2019-10-31-Clarify-Nullable.md index 57a5b1ce64..9d437c150c 100644 --- a/proposals/2019-10-31-Clarify-Nullable.md +++ b/proposals/2019-10-31-Clarify-Nullable.md @@ -8,7 +8,7 @@ |Proposal |[2019-10-31-Clarify-Nullable](https://github.com/OAI/OpenAPI-Specification/tree/main/proposals/2019-10-31-Clarify-Nullable.md)| |Authors|[Ted Epstein](https://github.com/tedepstein)| |Review Manager |TBD| -|Status |Proposal| +|Status |Promoted| |Implementations |N/A| |Issues | [1900](https://github.com/OAI/OpenAPI-Specification/issues/1900), [1368](https://github.com/OAI/OpenAPI-Specification/issues/1368), [1389](https://github.com/OAI/OpenAPI-Specification/issues/1389), [1957](https://github.com/OAI/OpenAPI-Specification/pull/1957), [2046](https://github.com/OAI/OpenAPI-Specification/pull/2046), [1977](https://github.com/OAI/OpenAPI-Specification/pull/1977#issuecomment-533333957), [2057](https://github.com/OAI/OpenAPI-Specification/issues/2057)| |Previous Revisions |N/A | @@ -18,6 +18,7 @@ |Date |Responsible Party |Description | |---- | ---------------- |------------| |Oct 31, 2019 | Ted Epstein | Initial proposal | +|Apr 8, 2021 | Ted Epstein | Update status to Promoted. The proposal was adopted in [OpenAPI 3.0.3](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md). | ## Introduction From 1fb4f83882e135899fee4c521cc1c6161bb85125 Mon Sep 17 00:00:00 2001 From: Michael Franzkowiak Date: Thu, 18 Nov 2021 18:50:08 +0100 Subject: [PATCH 035/149] Update IMPLEMENTATIONS.md (#2353) Add restful-react to list of implementations. --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index f99993cc72..d5f0c27ae6 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -86,6 +86,7 @@ These tools are not endorsed by the OAI. |-------|--------------|----------|-------------| | Scorpio | [github/notEthan/scorpio](https://github.com/notEthan/Scorpio) | Ruby | OpenAPI 2 and 3 implementation offering a HTTP client library | | openapi-client-axios | [github/anttiviljami/openapi-client-axios](https://github.com/anttiviljami/openapi-client-axios) | JavaScript, TypeScript | JavaScript client library for consuming OpenAPI-enabled APIs with axios. Types included. +| restful-react | [github/contiamo/restful-react](https://github.com/contiamo/restful-react) | Typescript | Well tested library to generate typesafe hooks and components. Easy to integrate into your development process. | #### Code Generators From 115cacc1d02e614385311c43490c70244ac2e2e2 Mon Sep 17 00:00:00 2001 From: Tobias Davis Date: Thu, 23 Dec 2021 08:30:14 -0600 Subject: [PATCH 036/149] fix: some broken IETF links (#2798) --- scripts/md2html/md2html.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/md2html/md2html.js b/scripts/md2html/md2html.js index b88309b45d..ae7a501967 100644 --- a/scripts/md2html/md2html.js +++ b/scripts/md2html/md2html.js @@ -263,10 +263,6 @@ for (let l in lines) { //return (group1 ? group1 : '')+']]'; return ']]'; }); - - while (line.indexOf('https://tools.ietf.org/html/rfc')>=0) { - line = line.replace(/.https:..tools.ietf.org.html.rfc[0-9]{1,5}./g,''); - } } // minor fixup to get bibliography link to work From af79cf08b61887c47d82e6aee5382540bd85aaa8 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Wed, 29 Dec 2021 08:49:27 -0800 Subject: [PATCH 037/149] The value field and externalValue field are mutually exclusive. (#2801) https://spec.openapis.org/oas/v3.1.0#example-object --- schemas/v3.1/schema.json | 6 ++++++ schemas/v3.1/schema.yaml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 295029fb14..c690c98be6 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -883,6 +883,12 @@ "format": "uri" } }, + "not": { + "required": [ + "value", + "externalValue" + ] + }, "$ref": "#/$defs/specification-extensions", "unevaluatedProperties": false }, diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 49c7a52cf5..a07793617d 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -607,6 +607,10 @@ $defs: externalValue: type: string format: uri + not: + required: + - value + - externalValue $ref: '#/$defs/specification-extensions' unevaluatedProperties: false From 42c153c36cd5226e299a2dd74e507aa288c13e8f Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Wed, 29 Dec 2021 08:50:49 -0800 Subject: [PATCH 038/149] more schema tweaks for parameter objects (#2811) * allowEmptyValue is valid only for query parameters https://spec.openapis.org/oas/v3.1.0#parameter-object we can't move this to the dependentSchemas section because that is only valid when "schema" is present. * allowReserved only applies to parameters with a value of query https://spec.openapis.org/oas/v3.1.0#parameter-object --- schemas/v3.1/schema.json | 30 ++++++++++++++++++++++-------- schemas/v3.1/schema.yaml | 21 ++++++++++++++------- 2 files changed, 36 insertions(+), 15 deletions(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index c690c98be6..9f1524f4dc 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -440,10 +440,6 @@ "default": false, "type": "boolean" }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - }, "schema": { "$dynamicRef": "#meta" }, @@ -469,6 +465,24 @@ ] } ], + "if": { + "properties": { + "in": { + "const": "query" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "allowEmptyValue": { + "default": false, + "type": "boolean" + } + } + }, "dependentSchemas": { "schema": { "properties": { @@ -477,10 +491,6 @@ }, "explode": { "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" } }, "allOf": [ @@ -578,6 +588,10 @@ "pipeDelimited", "deepObject" ] + }, + "allowReserved": { + "default": false, + "type": "boolean" } } } diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index a07793617d..bf44567463 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -311,9 +311,6 @@ $defs: deprecated: default: false type: boolean - allowEmptyValue: - default: false - type: boolean schema: $dynamicRef: '#meta' content: @@ -328,6 +325,17 @@ $defs: - schema - required: - content + if: + properties: + in: + const: query + required: + - in + then: + properties: + allowEmptyValue: + default: false + type: boolean dependentSchemas: schema: properties: @@ -335,9 +343,6 @@ $defs: type: string explode: type: boolean - allowReserved: - default: false - type: boolean allOf: - $ref: '#/$defs/examples' - $ref: '#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path' @@ -398,7 +403,9 @@ $defs: - spaceDelimited - pipeDelimited - deepObject - + allowReserved: + default: false + type: boolean styles-for-cookie: if: properties: From dabbcee7a998e780c2fdee7dd4e332d614dde168 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 6 Jan 2022 21:28:08 -0800 Subject: [PATCH 039/149] add format checks to these strings /info/termsOfService: https://spec.openapis.org/oas/v3.1.0#fixed-fields-0 /contact/url, email : https://spec.openapis.org/oas/v3.1.0#fixed-fields-1 implicit/authorizationUrl: https://spec.openapis.org/oas/v3.1.0#fixed-fields-24 authorizationUrl, tokenUrl, refreshUrl: https://spec.openapis.org/oas/v3.1.0#fixed-fields-24 --- schemas/v3.1/schema.json | 36 ++++++++++++++++++++++++------------ schemas/v3.1/schema.yaml | 12 ++++++++++++ 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 9f1524f4dc..dc8dfff965 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -87,7 +87,8 @@ "type": "string" }, "termsOfService": { - "type": "string" + "type": "string", + "format": "uri" }, "contact": { "$ref": "#/$defs/contact" @@ -114,10 +115,12 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" }, "email": { - "type": "string" + "type": "string", + "format": "email" } }, "$ref": "#/$defs/specification-extensions", @@ -1284,10 +1287,12 @@ "type": "object", "properties": { "authorizationUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "refreshUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "scopes": { "$ref": "#/$defs/map-of-strings" @@ -1304,10 +1309,12 @@ "type": "object", "properties": { "tokenUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "refreshUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "scopes": { "$ref": "#/$defs/map-of-strings" @@ -1324,10 +1331,12 @@ "type": "object", "properties": { "tokenUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "refreshUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "scopes": { "$ref": "#/$defs/map-of-strings" @@ -1344,13 +1353,16 @@ "type": "object", "properties": { "authorizationUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "tokenUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "refreshUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "scopes": { "$ref": "#/$defs/map-of-strings" diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index bf44567463..112f504e1c 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -60,6 +60,7 @@ $defs: type: string termsOfService: type: string + format: uri contact: $ref: '#/$defs/contact' license: @@ -80,8 +81,10 @@ $defs: type: string url: type: string + format: uri email: type: string + format: email $ref: '#/$defs/specification-extensions' unevaluatedProperties: false @@ -879,8 +882,10 @@ $defs: properties: authorizationUrl: type: string + format: uri refreshUrl: type: string + format: uri scopes: $ref: '#/$defs/map-of-strings' required: @@ -894,8 +899,10 @@ $defs: properties: tokenUrl: type: string + format: uri refreshUrl: type: string + format: uri scopes: $ref: '#/$defs/map-of-strings' required: @@ -909,8 +916,10 @@ $defs: properties: tokenUrl: type: string + format: uri refreshUrl: type: string + format: uri scopes: $ref: '#/$defs/map-of-strings' required: @@ -924,10 +933,13 @@ $defs: properties: authorizationUrl: type: string + format: uri tokenUrl: type: string + format: uri refreshUrl: type: string + format: uri scopes: $ref: '#/$defs/map-of-strings' required: From c0e63d60fda39201e6db9a96cc17481157aa9e5a Mon Sep 17 00:00:00 2001 From: Nicolas Froidure Date: Fri, 11 Feb 2022 01:16:38 +0100 Subject: [PATCH 040/149] Update IMPLEMENTATIONS.md (#2797) Add `schema2dts`, `whook` and `openapi-ts-sdk-builder` to implementations. --- IMPLEMENTATIONS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index d5f0c27ae6..f043369f2b 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -27,6 +27,7 @@ These tools are not endorsed by the OAI. | openapi-validator | [gitlab/mmal/openapi-validator](https://gitlab.com/mmalawski/openapi-validator) | PHP | Validates response against OpenAPI schema | | OpenAPI-Delphi | [github/paolo-rossi/OpenAPI-Delphi](https://github.com/paolo-rossi/OpenAPI-Delphi) | Delphi | Delphi implementation of a generator, parser and validator for the OpenAPI 3 Specification | | spring-openapi | [github/jrcodeza/spring-openapi](https://github.com/jrcodeza/spring-openapi) | Java | OpenAPI v3 generator for Java Spring. Includes also client generation. Supports inheritance with discriminators and Jackson annotations and custom interceptors. | +| schema2dts | [nfroidure/schema2dts](https://github.com/nfroidure/schema2dts) | Typescript | Create types definitions from an OpenAPI schema. | #### Editors @@ -79,6 +80,7 @@ These tools are not endorsed by the OAI. | openapi-backend | [github/anttiviljami/openapi-backend](https://github.com/anttiviljami/openapi-backend) | Node.js, TypeScript | Build, Validate, Route, and Mock in the backend using OpenAPI v3 spec in your favourite framework | JSONSchema::Validator | [https://github.com/skbkontur/perl-jsonschema-validator](https://github.com/skbkontur/perl-jsonschema-validator) | Perl | OpenAPI 3 request/response validation | rest | [github.com/swaggest/rest](https://github.com/swaggest/rest) | Go | API server with automatic request/response mapping/validation and OpenAPI schema +| whook | [nfroidure/whook](https://github.com/nfroidure/whook) | Typescript | OpenAPI 3 based NodeJS server. | #### Client Implementations @@ -87,6 +89,7 @@ These tools are not endorsed by the OAI. | Scorpio | [github/notEthan/scorpio](https://github.com/notEthan/Scorpio) | Ruby | OpenAPI 2 and 3 implementation offering a HTTP client library | | openapi-client-axios | [github/anttiviljami/openapi-client-axios](https://github.com/anttiviljami/openapi-client-axios) | JavaScript, TypeScript | JavaScript client library for consuming OpenAPI-enabled APIs with axios. Types included. | restful-react | [github/contiamo/restful-react](https://github.com/contiamo/restful-react) | Typescript | Well tested library to generate typesafe hooks and components. Easy to integrate into your development process. | +| openapi-ts-sdk-builder | [nfroidure/openapi-ts-sdk-builder](https://github.com/nfroidure/openapi-ts-sdk-builder) | Typescript | Generate a TypeScript SDK from OpenAPI 3 definitions. | #### Code Generators From ba36b2848acab0535cef5fdfd46f8784608e6f99 Mon Sep 17 00:00:00 2001 From: Kerry Kimbrough Date: Thu, 10 Feb 2022 18:18:32 -0600 Subject: [PATCH 041/149] Testing tools: Add Tcases for OpenAPI (#2878) --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index f043369f2b..6810d4d267 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -65,6 +65,7 @@ These tools are not endorsed by the OAI. | Title | Project Link | Language | Description | | ------|--------------|----------|-------------| | Schemathesis | [github/schemathesis/schemathesis](https://github.com/schemathesis/schemathesis) | Python | A modern API testing tool for web applications built with OpenAPI and GraphQL specifications | +| Tcases for OpenAPI | [github/Cornutum/tcases](https://github.com/Cornutum/tcases/blob/master/tcases-openapi/README.md#tcases-for-openapi-from-rest-ful-to-test-ful) | Java | Generates test cases directly from an OpenAPI 3.0.X definition. Creates tests executable using various test frameworks. Bonus: Semantic linter reports elements that are inconsistent, superfluous, or dubious. | #### Server Implementations From 80c781e479f85ac67001ceb3e7e410e25d2a561b Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 24 Feb 2022 08:39:32 -0800 Subject: [PATCH 042/149] add description to all schemas (#2802) in v3.1 the number of schemas increased considerably, which can be a bit confusing. --- schemas/v3.0/schema.json | 2 +- schemas/v3.0/schema.yaml | 2 +- schemas/v3.1/dialect/base.schema.json | 3 ++- schemas/v3.1/dialect/base.schema.yaml | 3 ++- schemas/v3.1/meta/base.schema.json | 3 ++- schemas/v3.1/meta/base.schema.yaml | 3 ++- schemas/v3.1/schema-base.json | 1 + schemas/v3.1/schema-base.yaml | 1 + schemas/v3.1/schema.json | 1 + schemas/v3.1/schema.yaml | 1 + 10 files changed, 14 insertions(+), 6 deletions(-) diff --git a/schemas/v3.0/schema.json b/schemas/v3.0/schema.json index dadd2837eb..4360553fe5 100644 --- a/schemas/v3.0/schema.json +++ b/schemas/v3.0/schema.json @@ -1,7 +1,7 @@ { "id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Validation schema for OpenAPI Specification 3.0.X.", + "description": "The description of OpenAPI v3.0.x documents, as defined by https://spec.openapis.org/oas/v3.0.3", "type": "object", "required": [ "openapi", diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index 2bee05d9a0..8a006dc75b 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -1,6 +1,6 @@ id: https://spec.openapis.org/oas/3.0/schema/2021-09-28 $schema: http://json-schema.org/draft-04/schema# -description: Validation schema for OpenAPI Specification 3.0.X. +description: The description of OpenAPI v3.0.x documents, as defined by https://spec.openapis.org/oas/v3.0.3 type: object required: - openapi diff --git a/schemas/v3.1/dialect/base.schema.json b/schemas/v3.1/dialect/base.schema.json index d54b0d4d7c..762574dd83 100644 --- a/schemas/v3.1/dialect/base.schema.json +++ b/schemas/v3.1/dialect/base.schema.json @@ -1,4 +1,6 @@ { + "title": "OpenAPI 3.1 Schema Object Dialect", + "description": "A JSON Schema dialect describing schemas found in OpenAPI documents", "$id": "https://spec.openapis.org/oas/3.1/dialect/base", "$schema": "https://json-schema.org/draft/2020-12/schema", "$vocabulary": { @@ -13,7 +15,6 @@ }, "$dynamicAnchor": "meta", - "title": "OpenAPI 3.1 Schema Object Dialect", "allOf": [ { "$ref": "https://json-schema.org/draft/2020-12/schema" }, { "$ref": "https://spec.openapis.org/oas/3.1/meta/base" } diff --git a/schemas/v3.1/dialect/base.schema.yaml b/schemas/v3.1/dialect/base.schema.yaml index 8f1bf734cb..81d42a7585 100644 --- a/schemas/v3.1/dialect/base.schema.yaml +++ b/schemas/v3.1/dialect/base.schema.yaml @@ -1,4 +1,6 @@ --- +title: OpenAPI 3.1 Schema Object Dialect +description: A JSON Schema dialect describing schemas found in OpenAPI documents $dynamicAnchor: meta $id: https://spec.openapis.org/oas/3.1/dialect/base $schema: https://json-schema.org/draft/2020-12/schema @@ -14,4 +16,3 @@ $vocabulary: allOf: - $ref: https://json-schema.org/draft/2020-12/schema - $ref: https://spec.openapis.org/oas/3.1/meta/base -title: OpenAPI 3.1 Schema Object Dialect diff --git a/schemas/v3.1/meta/base.schema.json b/schemas/v3.1/meta/base.schema.json index f3ee03fb96..c3b2fea08f 100644 --- a/schemas/v3.1/meta/base.schema.json +++ b/schemas/v3.1/meta/base.schema.json @@ -1,11 +1,12 @@ { + "title": "OAS Base vocabulary", + "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", "$id": "https://spec.openapis.org/oas/3.1/meta/base", "$schema": "https://json-schema.org/draft/2020-12/schema", "$vocabulary": { "https://spec.openapis.org/oas/3.1/vocab/base": true }, "$dynamicAnchor": "meta", - "title": "OAS Base vocabulary", "type": ["object", "boolean"], "properties": { diff --git a/schemas/v3.1/meta/base.schema.yaml b/schemas/v3.1/meta/base.schema.yaml index 80a662a179..a0de79c5d3 100644 --- a/schemas/v3.1/meta/base.schema.yaml +++ b/schemas/v3.1/meta/base.schema.yaml @@ -1,4 +1,6 @@ --- +title: OAS Base vocabulary +description: A JSON Schema Vocabulary used in the OpenAPI Schema Dialect $defs: discriminator: $ref: '#/$defs/extensible' @@ -57,7 +59,6 @@ properties: $ref: '#/$defs/external-docs' xml: $ref: '#/$defs/xml' -title: OAS Base vocabulary type: - object - boolean diff --git a/schemas/v3.1/schema-base.json b/schemas/v3.1/schema-base.json index 03692f631a..c1855b5d41 100644 --- a/schemas/v3.1/schema-base.json +++ b/schemas/v3.1/schema-base.json @@ -1,4 +1,5 @@ { + "description": "The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0", "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-09-28", "$schema": "https://json-schema.org/draft/2020-12/schema", "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-09-28", diff --git a/schemas/v3.1/schema-base.yaml b/schemas/v3.1/schema-base.yaml index 59b43a8531..b0360a7bfd 100644 --- a/schemas/v3.1/schema-base.yaml +++ b/schemas/v3.1/schema-base.yaml @@ -1,3 +1,4 @@ +description: The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0 $id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-09-28' $schema: 'https://json-schema.org/draft/2020-12/schema' diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index dc8dfff965..608721e72d 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -1,4 +1,5 @@ { + "description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0", "$id": "https://spec.openapis.org/oas/3.1/schema/2021-09-28", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 112f504e1c..c9e0155f66 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -1,3 +1,4 @@ +description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0 $id: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28' $schema: 'https://json-schema.org/draft/2020-12/schema' From dfc82925e638b3b7174de42b6c95761617c67747 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 24 Feb 2022 08:44:24 -0800 Subject: [PATCH 043/149] document the default for /servers (#2861) https://spec.openapis.org/oas/v3.1.0#fixed-fields --- schemas/v3.1/schema.json | 5 ++++- schemas/v3.1/schema.yaml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 608721e72d..77bd4544b4 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -20,7 +20,10 @@ "type": "array", "items": { "$ref": "#/$defs/server" - } + }, + "default": [ + { "url": "/" } + ] }, "paths": { "$ref": "#/$defs/paths" diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index c9e0155f66..fd9582f0d8 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -17,6 +17,8 @@ properties: type: array items: $ref: '#/$defs/server' + default: + - url: / paths: $ref: '#/$defs/paths' webhooks: From f6f9ab3d88ad6ff0b235d5f4dc1a8ab28941d895 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 24 Feb 2022 09:52:17 -0800 Subject: [PATCH 044/149] "The Responses Object MUST contain at least one response code" (#2799) https://spec.openapis.org/oas/v3.1.0#responses-object --- schemas/v3.1/schema.json | 1 + schemas/v3.1/schema.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 77bd4544b4..576e43f21d 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -820,6 +820,7 @@ "$ref": "#/$defs/response-or-reference" } }, + "minProperties": 1, "$ref": "#/$defs/specification-extensions", "unevaluatedProperties": false }, diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index fd9582f0d8..6e05f65b63 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -557,6 +557,7 @@ $defs: patternProperties: '^[1-5](?:[0-9]{2}|XX)$': $ref: '#/$defs/response-or-reference' + minProperties: 1 $ref: '#/$defs/specification-extensions' unevaluatedProperties: false From a1facce1b3621df3630cb692e9fbe18a7612ea6d Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Thu, 10 Mar 2022 09:23:08 -0800 Subject: [PATCH 045/149] Bump schema version numbers for 2022-02-17 release (#2888) --- schemas/v3.1/dialect/base.schema.json | 7 +++-- schemas/v3.1/dialect/base.schema.yaml | 13 +++++--- schemas/v3.1/meta/base.schema.json | 11 +++++-- schemas/v3.1/meta/base.schema.yaml | 44 +++++++++++++++------------ schemas/v3.1/schema-base.json | 24 +++++++-------- schemas/v3.1/schema-base.yaml | 8 +++-- schemas/v3.1/schema.json | 4 +-- schemas/v3.1/schema.yaml | 5 +-- scripts/validate.js | 2 +- tests/v3.1/test.js | 2 +- 10 files changed, 70 insertions(+), 50 deletions(-) diff --git a/schemas/v3.1/dialect/base.schema.json b/schemas/v3.1/dialect/base.schema.json index 762574dd83..eae8386e8a 100644 --- a/schemas/v3.1/dialect/base.schema.json +++ b/schemas/v3.1/dialect/base.schema.json @@ -1,8 +1,10 @@ { - "title": "OpenAPI 3.1 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI documents", "$id": "https://spec.openapis.org/oas/3.1/dialect/base", "$schema": "https://json-schema.org/draft/2020-12/schema", + + "title": "OpenAPI 3.1 Schema Object Dialect", + "description": "A JSON Schema dialect describing schemas found in OpenAPI documents", + "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true, "https://json-schema.org/draft/2020-12/vocab/applicator": true, @@ -13,6 +15,7 @@ "https://json-schema.org/draft/2020-12/vocab/content": true, "https://spec.openapis.org/oas/3.1/vocab/base": false }, + "$dynamicAnchor": "meta", "allOf": [ diff --git a/schemas/v3.1/dialect/base.schema.yaml b/schemas/v3.1/dialect/base.schema.yaml index 81d42a7585..30996abb0e 100644 --- a/schemas/v3.1/dialect/base.schema.yaml +++ b/schemas/v3.1/dialect/base.schema.yaml @@ -1,9 +1,11 @@ ---- +$id: https://spec.openapis.org/oas/3.1/dialect/base +$schema: https://json-schema.org/draft/2020-12/schema + title: OpenAPI 3.1 Schema Object Dialect description: A JSON Schema dialect describing schemas found in OpenAPI documents + $dynamicAnchor: meta -$id: https://spec.openapis.org/oas/3.1/dialect/base -$schema: https://json-schema.org/draft/2020-12/schema + $vocabulary: https://json-schema.org/draft/2020-12/vocab/applicator: true https://json-schema.org/draft/2020-12/vocab/content: true @@ -13,6 +15,7 @@ $vocabulary: https://json-schema.org/draft/2020-12/vocab/unevaluated: true https://json-schema.org/draft/2020-12/vocab/validation: true https://spec.openapis.org/oas/3.1/vocab/base: false + allOf: -- $ref: https://json-schema.org/draft/2020-12/schema -- $ref: https://spec.openapis.org/oas/3.1/meta/base + - $ref: https://json-schema.org/draft/2020-12/schema + - $ref: https://spec.openapis.org/oas/3.1/meta/base diff --git a/schemas/v3.1/meta/base.schema.json b/schemas/v3.1/meta/base.schema.json index c3b2fea08f..a7a59f1c7d 100644 --- a/schemas/v3.1/meta/base.schema.json +++ b/schemas/v3.1/meta/base.schema.json @@ -1,11 +1,14 @@ { - "title": "OAS Base vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", "$id": "https://spec.openapis.org/oas/3.1/meta/base", "$schema": "https://json-schema.org/draft/2020-12/schema", + + "title": "OAS Base vocabulary", + "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", + "$vocabulary": { "https://spec.openapis.org/oas/3.1/vocab/base": true }, + "$dynamicAnchor": "meta", "type": ["object", "boolean"], @@ -15,12 +18,14 @@ "externalDocs": { "$ref": "#/$defs/external-docs" }, "xml": { "$ref": "#/$defs/xml" } }, + "$defs": { "extensible": { "patternProperties": { "^x-": true } }, + "discriminator": { "$ref": "#/$defs/extensible", "type": "object", @@ -38,6 +43,7 @@ "required": ["propertyName"], "unevaluatedProperties": false }, + "external-docs": { "$ref": "#/$defs/extensible", "type": "object", @@ -53,6 +59,7 @@ "required": ["url"], "unevaluatedProperties": false }, + "xml": { "$ref": "#/$defs/extensible", "type": "object", diff --git a/schemas/v3.1/meta/base.schema.yaml b/schemas/v3.1/meta/base.schema.yaml index a0de79c5d3..e2849e4115 100644 --- a/schemas/v3.1/meta/base.schema.yaml +++ b/schemas/v3.1/meta/base.schema.yaml @@ -1,6 +1,26 @@ ---- +$id: https://spec.openapis.org/oas/3.1/meta/base +$schema: https://json-schema.org/draft/2020-12/schema + title: OAS Base vocabulary description: A JSON Schema Vocabulary used in the OpenAPI Schema Dialect + +$dynamicAnchor: meta + +$vocabulary: + https://spec.openapis.org/oas/3.1/vocab/base: true + +type: + - object + - boolean +properties: + discriminator: + $ref: '#/$defs/discriminator' + example: true + externalDocs: + $ref: '#/$defs/external-docs' + xml: + $ref: '#/$defs/xml' + $defs: discriminator: $ref: '#/$defs/extensible' @@ -12,9 +32,10 @@ $defs: propertyName: type: string required: - - propertyName + - propertyName type: object unevaluatedProperties: false + extensible: patternProperties: ^x-: true @@ -27,9 +48,10 @@ $defs: format: uri-reference type: string required: - - url + - url type: object unevaluatedProperties: false + xml: $ref: '#/$defs/extensible' properties: @@ -46,19 +68,3 @@ $defs: type: boolean type: object unevaluatedProperties: false -$dynamicAnchor: meta -$id: https://spec.openapis.org/oas/3.1/meta/base -$schema: https://json-schema.org/draft/2020-12/schema -$vocabulary: - https://spec.openapis.org/oas/3.1/vocab/base: true -properties: - discriminator: - $ref: '#/$defs/discriminator' - example: true - externalDocs: - $ref: '#/$defs/external-docs' - xml: - $ref: '#/$defs/xml' -type: -- object -- boolean diff --git a/schemas/v3.1/schema-base.json b/schemas/v3.1/schema-base.json index c1855b5d41..04c9f60206 100644 --- a/schemas/v3.1/schema-base.json +++ b/schemas/v3.1/schema-base.json @@ -1,25 +1,23 @@ { - "description": "The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0", - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-09-28", + "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-02-27", "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-09-28", + + "description": "The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0", + + "$ref": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } }, + "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/base" - }, + "dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" }, + "schema": { "$dynamicAnchor": "meta", "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } + "$schema": { "$ref": "#/$defs/dialect" } } } } -} \ No newline at end of file +} diff --git a/schemas/v3.1/schema-base.yaml b/schemas/v3.1/schema-base.yaml index b0360a7bfd..d4fa536fde 100644 --- a/schemas/v3.1/schema-base.yaml +++ b/schemas/v3.1/schema-base.yaml @@ -1,8 +1,9 @@ -description: The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0 -$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-09-28' +$id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-02-27' $schema: 'https://json-schema.org/draft/2020-12/schema' -$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28' +description: The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0 + +$ref: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27' properties: jsonSchemaDialect: $ref: '#/$defs/dialect' @@ -10,6 +11,7 @@ properties: $defs: dialect: const: 'https://spec.openapis.org/oas/3.1/dialect/base' + schema: $dynamicAnchor: meta $ref: 'https://spec.openapis.org/oas/3.1/dialect/base' diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 576e43f21d..ed0fd49a65 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -1,7 +1,7 @@ { - "description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0", - "$id": "https://spec.openapis.org/oas/3.1/schema/2021-09-28", + "$id": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0", "type": "object", "properties": { "openapi": { diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 6e05f65b63..64fa7522a1 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -1,7 +1,8 @@ -description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0 -$id: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28' +$id: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27' $schema: 'https://json-schema.org/draft/2020-12/schema' +description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0 + type: object properties: openapi: diff --git a/scripts/validate.js b/scripts/validate.js index c9c70db797..37446ce616 100755 --- a/scripts/validate.js +++ b/scripts/validate.js @@ -25,7 +25,7 @@ const args = process.argv.reduce((acc, arg) => { (async function () { try { const schemaType = args.schema || "schema"; - const schemaVersion = args.version || "2021-03-02"; + const schemaVersion = args.version || "2022-02-27"; const outputFormat = args.format || JsonSchema.BASIC; // Config diff --git a/tests/v3.1/test.js b/tests/v3.1/test.js index 5e9dc31104..e7679f5059 100644 --- a/tests/v3.1/test.js +++ b/tests/v3.1/test.js @@ -14,7 +14,7 @@ before(async () => { JsonSchema.add(dialect); JsonSchema.add(vocabulary); JsonSchema.add(yaml.parse(fs.readFileSync(`${__dirname}/../../schemas/v3.1/schema.yaml`, "utf8"), { prettyErrors: true })); - metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2021-09-28"); + metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2022-02-27"); }); describe("v3.1 Pass", () => { From 733c879b3a760be5d8980d065fef284bf4aa0a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81xel=20Costas=20Pena?= Date: Sun, 27 Mar 2022 22:27:33 +0200 Subject: [PATCH 046/149] Make PathItem operation properties specific. (#2127) Avoid misuse of `patternProperties` feature. Fix OAI/OpenAPI-Specification#2126 --- schemas/v3.0/schema.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index 8a006dc75b..e9d70c8e01 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -495,6 +495,22 @@ definitions: type: string description: type: string + get: + $ref: '#/definitions/Operation' + put: + $ref: '#/definitions/Operation' + post: + $ref: '#/definitions/Operation' + delete: + $ref: '#/definitions/Operation' + options: + $ref: '#/definitions/Operation' + head: + $ref: '#/definitions/Operation' + patch: + $ref: '#/definitions/Operation' + trace: + $ref: '#/definitions/Operation' servers: type: array items: @@ -507,8 +523,6 @@ definitions: - $ref: '#/definitions/Reference' uniqueItems: true patternProperties: - '^(get|put|post|delete|options|head|patch|trace)$': - $ref: '#/definitions/Operation' '^x-': {} additionalProperties: false From 3e48c1e40a01ac3ae1b577968738cc8055d2c072 Mon Sep 17 00:00:00 2001 From: m-aciek Date: Sun, 27 Mar 2022 22:29:50 +0200 Subject: [PATCH 047/149] Add Connexion Python framework (#2323) To server implementations. Co-authored-by: m-aciek Co-authored-by: Ron --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 6810d4d267..66200776cc 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -79,6 +79,7 @@ These tools are not endorsed by the OAI. | FastAPI | [github/tiangolo/fastapi](https://github.com/tiangolo/fastapi) | Python | OpenAPI 3 based, high performance, Python 3.6+ API framework with automatic data validation, serialization and great editor support. | Fastify OpenAPI v3 | [gitlab.com/m03geek/fastify-oas](https://gitlab.com/m03geek/fastify-oas) | Node.JS | Fastify OpenAPI v3+ plugin. Generates OpenAPI specification from fastify schemas and routes. Also serves swagger ui and spec in json/yaml formats. | openapi-backend | [github/anttiviljami/openapi-backend](https://github.com/anttiviljami/openapi-backend) | Node.js, TypeScript | Build, Validate, Route, and Mock in the backend using OpenAPI v3 spec in your favourite framework +| Connexion | [github/zalando/connexion](https://github.com/zalando/connexion) | Python | Swagger/OpenAPI First framework for Python on top of Flask with automatic endpoint validation & OAuth2 support | JSONSchema::Validator | [https://github.com/skbkontur/perl-jsonschema-validator](https://github.com/skbkontur/perl-jsonschema-validator) | Perl | OpenAPI 3 request/response validation | rest | [github.com/swaggest/rest](https://github.com/swaggest/rest) | Go | API server with automatic request/response mapping/validation and OpenAPI schema | whook | [nfroidure/whook](https://github.com/nfroidure/whook) | Typescript | OpenAPI 3 based NodeJS server. | From 949af1f564feffd3ee694658664c415f2faf6e43 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Mon, 28 Mar 2022 00:38:01 +0300 Subject: [PATCH 048/149] add oasdiff tool (#2494) --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 66200776cc..4713bbcd03 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -8,6 +8,7 @@ These tools are not endorsed by the OAI. | Title | Project Link | Language | Description | |-------|--------------|----------|-------------| +| oasdiff | [github/tufin/oasdiff](https://github.com/tufin/oasdiff) | Go | Diff tool for OpenAPI 3.x specs, written as a Golang module | | swagger-parser | [github/swagger-api](https://github.com/swagger-api/swagger-parser) | Java | Swagger 1.0, 1.1, 1.2, 2.0 to OpenAPI Specification converter | | swagger-models | [github/swagger-api](https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-models) | Java | OpenAPI 3.0 Java Pojos | | springdoc-openapi | [github/springdoc/springdoc-openapi](https://github.com/springdoc/springdoc-openapi) | Java | Library that produces OpenAPI 3.x specification documentation for spring-boot applications. | From 7716b92f4e839551a59ecf469fe59ec5786d244f Mon Sep 17 00:00:00 2001 From: Jeff EF Date: Thu, 31 Mar 2022 09:25:42 -0700 Subject: [PATCH 049/149] Update README.md (#2907) Added a link to the new calendar that includes all technical discussions such as SIGs. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 02a6ce5be2..39b79e09b5 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The current process for development of the OpenAPI Specification is described in [Development Guidelines](DEVELOPMENT.md). Development of the next version of the OpenAPI Specification is guided by the [Technical Steering Committee (TSC)](https://www.openapis.org/participate/how-to-contribute/governance#TDC). This group of committers bring their API expertise, incorporate feedback from the community, and expand the group of committers as appropriate. All development activity on the future specification will be performed as features and merged into this branch. Upon release of the future specification, this branch will be merged to `main`. -The TSC holds weekly web conferences to review open pull requests and discuss open issues related to the evolving OpenAPI Specification. Participation in weekly calls and scheduled working sessions is open to the community. You can view the [TSC calendar online](https://openapi.groups.io/g/tsc/calendar). Look for the "Subscribe to Calendar" button for instructions on subscribing. +The TSC holds weekly web conferences to review open pull requests and discuss open issues related to the evolving OpenAPI Specification. Participation in weekly calls and scheduled working sessions is open to the community. You can view the entire OpenAPI [technical meeting calendar](https://calendar.google.com/calendar/u/0/embed?src=c_fue82vsncog6ahhjvuokjo8qsk@group.calendar.google.com) online. The OpenAPI Initiative encourages participation from individuals and companies alike. If you want to participate in the evolution of the OpenAPI Specification, consider taking the following actions: From cede0ea56b887e29d0f46627503648d16340078d Mon Sep 17 00:00:00 2001 From: Jeff EF Date: Thu, 31 Mar 2022 11:05:43 -0700 Subject: [PATCH 050/149] Updated file to reflect release of 3.0, etc. (#2906) Updated to remove outdated references to 2.0 since the current version is > 2.0. Will leverage this document as part of the SIG onboarding process. --- DEVELOPMENT.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6b8fc56e87..42347f57af 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -24,7 +24,7 @@ The specification *will evolve over time*. Changes may be made when any of the For each change in the specification we should *always* consider the following: -* Migration. Is this a construct that has a path from the existing 2.0 specification? If so, how complicated is it to migrate to the proposed change? +* Migration. Is this a construct that has a path from the [existing specification](https://github.com/OAI/OpenAPI-Specification/releases))? If so, how complicated is it to migrate to the proposed change? * Tooling. Strive to support code generation, software interfaces, spec generation techniques, as well as other utilities. Some features may be impossible to support in different frameworks/languages. These should be documented and considered during the change approval process. @@ -36,7 +36,7 @@ Spec changes should be approved by a majority of the committers. Approval can be * GitHub is the medium of record for all spec designs, use cases, and so on. -* As with 2.0, the **human readable** document is the source of truth. If using a JSON Schema again to document the spec, it is secondary to the human documentation. The documentation should live in a *.md file, in parallel to the 2.0 document (versions/3.0.0.md for example). +* The **human readable** document is the source of truth. If using a JSON Schema again to document the spec, it is secondary to the human documentation. The documentation should live in a *.md file, in parallel to the latest document (versions/3.0.0.md for example). * At any given time, there would be *at most* 4 work branches. The branches would exist if work has started on them. Assuming a current version of 3.0.0: From aa91a19c43f8a12c02efa42d64794e396473f3b1 Mon Sep 17 00:00:00 2001 From: commonism Date: Wed, 20 Apr 2022 16:22:08 +0200 Subject: [PATCH 051/149] implementations - add aiopenapi3 (#2916) Co-authored-by: Markus Koetter --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 4713bbcd03..2c3a81b829 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -93,6 +93,7 @@ These tools are not endorsed by the OAI. | openapi-client-axios | [github/anttiviljami/openapi-client-axios](https://github.com/anttiviljami/openapi-client-axios) | JavaScript, TypeScript | JavaScript client library for consuming OpenAPI-enabled APIs with axios. Types included. | restful-react | [github/contiamo/restful-react](https://github.com/contiamo/restful-react) | Typescript | Well tested library to generate typesafe hooks and components. Easy to integrate into your development process. | | openapi-ts-sdk-builder | [nfroidure/openapi-ts-sdk-builder](https://github.com/nfroidure/openapi-ts-sdk-builder) | Typescript | Generate a TypeScript SDK from OpenAPI 3 definitions. | +| aiopenapi3 | [github.com/commonism/aiopenapi3](https://github.com/commonism/aiopenapi3) | Python | OpenAPI 3, Python3.7+ client & validator with automatic data validation & serialization, sync or asyncio. #### Code Generators From 67af45b4b6ac49b8cd0d5c89471fb918b1ec7b46 Mon Sep 17 00:00:00 2001 From: Susheel Kumar <74233895+Susheel4115@users.noreply.github.com> Date: Sun, 26 Jun 2022 15:07:31 +0530 Subject: [PATCH 052/149] Cleared last line --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39b79e09b5..0cf554bd61 100644 --- a/README.md +++ b/README.md @@ -56,4 +56,4 @@ Not all feedback can be accommodated and there may be solid arguments for or aga See: [License (Apache-2.0)](https://github.com/OAI/OpenAPI-Specification/blob/main/LICENSE) -![Analytics](https://ga-beacon.appspot.com/UA-831873-42/readme.md?pixel) + From d9a862f424d05c45bddbaa586b0be082d861b691 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Sat, 2 Jul 2022 13:12:23 -0700 Subject: [PATCH 053/149] operationId in the link object is a string https://spec.openapis.org/oas/v3.1.0#fixed-fields-16 --- schemas/v3.1/schema.json | 4 +++- schemas/v3.1/schema.yaml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index ed0fd49a65..8e57ff9fc9 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -936,7 +936,9 @@ "type": "string", "format": "uri-reference" }, - "operationId": true, + "operationId": { + "type": "string" + }, "parameters": { "$ref": "#/$defs/map-of-strings" }, diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 64fa7522a1..e0ed8dad42 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -646,7 +646,8 @@ $defs: operationRef: type: string format: uri-reference - operationId: true + operationId: + type: string parameters: $ref: '#/$defs/map-of-strings' requestBody: true From 43772429de1866577fb3621f91c0858aef86acd7 Mon Sep 17 00:00:00 2001 From: Yue Zhao Date: Thu, 21 Jul 2022 13:41:53 -0700 Subject: [PATCH 054/149] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 39b79e09b5..dcdc895a1b 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ The OpenAPI Specification is a community-driven open specification within the [OpenAPI Initiative](https://www.openapis.org/), a Linux Foundation Collaborative Project. -The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service. +The OpenAPI Specification (OAS) defines a standard and programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with minimal implementation logic. Similar to what interface descriptions do for lower-level programming, the OpenAPI Specification removes the guesswork in calling a service. -Use cases for machine-readable API definition documents include, but are not limited to: interactive documentation; code generation for documentation, clients, and servers; and automation of test cases. OpenAPI documents describe an APIs services and are represented in either YAML or JSON formats. These documents may either be produced and served statically or be generated dynamically from an application. +Use cases for machine-readable API definition documents include, but are not limited to: interactive documentation; code generation for documentation, clients, and servers; and automation of test cases. OpenAPI documents describe APIs services and are represented in YAML or JSON formats. These documents may be produced and served statically or generated dynamically from an application. -The OpenAPI Specification does not require rewriting existing APIs. It does not require binding any software to a service – the service being described may not even be owned by the creator of its description. It does, however, require the capabilities of the service be described in the structure of the OpenAPI Specification. Not all services can be described by OpenAPI – this specification is not intended to cover every possible style of HTTP APIs, but does include support for [REST APIs](https://en.wikipedia.org/wiki/Representational_state_transfer). The OpenAPI Specification does not mandate a specific development process such as design-first or code-first. It does facilitate either technique by establishing clear interactions with a HTTP API. +The OpenAPI Specification does not require rewriting existing APIs. It does not require binding any software to a service – the described service may not even be owned by the creator of its description. It does, however, require the service's capabilities be described in the structure of the OpenAPI Specification. Not all services can be described by OpenAPI – this specification is not intended to cover every possible style of HTTP APIs, but does include support for [REST APIs](https://en.wikipedia.org/wiki/Representational_state_transfer). The OpenAPI Specification does not mandate a specific development process such as design-first or code-first. It does facilitate either technique by establishing clear interactions with an HTTP API. This GitHub project is the starting point for OpenAPI. Here you will find the information you need about the OpenAPI Specification, simple examples of what it looks like, and some general information regarding the project. @@ -36,9 +36,9 @@ Looking to see how you can create your own OpenAPI definition, present it, or ot ## Participation -The current process for development of the OpenAPI Specification is described in +The current process for developing the OpenAPI Specification is described in [Development Guidelines](DEVELOPMENT.md). -Development of the next version of the OpenAPI Specification is guided by the [Technical Steering Committee (TSC)](https://www.openapis.org/participate/how-to-contribute/governance#TDC). This group of committers bring their API expertise, incorporate feedback from the community, and expand the group of committers as appropriate. All development activity on the future specification will be performed as features and merged into this branch. Upon release of the future specification, this branch will be merged to `main`. +Developing the next version of the OpenAPI Specification is guided by the [Technical Steering Committee (TSC)](https://www.openapis.org/participate/how-to-contribute/governance#TDC). This group of committers bring their API expertise, incorporate feedback from the community, and expand the group of committers as appropriate. All development activity on the future specification will be performed as features and merged into this branch. Upon release of the future specification, this branch will be merged to `main`. The TSC holds weekly web conferences to review open pull requests and discuss open issues related to the evolving OpenAPI Specification. Participation in weekly calls and scheduled working sessions is open to the community. You can view the entire OpenAPI [technical meeting calendar](https://calendar.google.com/calendar/u/0/embed?src=c_fue82vsncog6ahhjvuokjo8qsk@group.calendar.google.com) online. @@ -50,7 +50,7 @@ The OpenAPI Initiative encourages participation from individuals and companies a * Subscribe to an open issue a day (or a week) in your inbox via [CodeTriage.com](https://www.codetriage.com/oai/openapi-specification). * Create an issue to describe a new concern. If possible, propose a solution. -Not all feedback can be accommodated and there may be solid arguments for or against a change being appropriate for the specification. +Not all feedback can be accommodated, and there may be solid arguments for or against a change being appropriate for the specification. ## Licensing From 65d2a9f2c36be8404c8fa625aa6b451b11474385 Mon Sep 17 00:00:00 2001 From: Sergey Vilgelm Date: Fri, 26 Aug 2022 12:18:07 -0700 Subject: [PATCH 055/149] Add a ref to implementation of v3.1 in Go (#3008) the implementation of the OpenAPI v3.1 Spec in Go with generics --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 2c3a81b829..0152176937 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -24,6 +24,7 @@ These tools are not endorsed by the OAI. | openapi | [github/wzshiming/openapi](https://github.com/wzshiming/openapi) | Go | OpenAPI 3 Specification for golang | | kin-openapi | [github/getkin/kin-openapi](https://github.com/getkin/kin-openapi) | Go | OpenAPI 3.x implementation for Go (parsing, converting, validation) | | openapi-go | [github/swaggest/openapi-go](https://github.com/swaggest/openapi-go) | Go | Type-safe OpenAPI 3.x bindings and generator from code | +| openapi | [sv-tools/openapi](https://github.com/sv-tools/openapi) | Go | OpenAPI v3.1 Spec implementation in Go with generics | | Spectral | [github/stoplightio/spectral](https://github.com/stoplightio/spectral) | TypeScript, JavaScript | A flexible JSON object linter with out of the box support for OpenAPI Specification 2 and 3 | | openapi-validator | [gitlab/mmal/openapi-validator](https://gitlab.com/mmalawski/openapi-validator) | PHP | Validates response against OpenAPI schema | | OpenAPI-Delphi | [github/paolo-rossi/OpenAPI-Delphi](https://github.com/paolo-rossi/OpenAPI-Delphi) | Delphi | Delphi implementation of a generator, parser and validator for the OpenAPI 3 Specification | From d84b34e5b757c092f614cd3ab9dadb3505d2457f Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Sun, 11 Sep 2022 13:22:33 -0700 Subject: [PATCH 056/149] Make PathItem operation properties specific. (port of PR #2127 to v3.1) --- schemas/v3.1/schema.json | 27 +++++++++++++++++++++++---- schemas/v3.1/schema.yaml | 17 +++++++++++++++-- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index ed0fd49a65..3c2276a80d 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -319,10 +319,29 @@ "items": { "$ref": "#/$defs/parameter-or-reference" } - } - }, - "patternProperties": { - "^(get|put|post|delete|options|head|patch|trace)$": { + }, + "get": { + "$ref": "#/$defs/operation" + }, + "put": { + "$ref": "#/$defs/operation" + }, + "post": { + "$ref": "#/$defs/operation" + }, + "delete": { + "$ref": "#/$defs/operation" + }, + "options": { + "$ref": "#/$defs/operation" + }, + "head": { + "$ref": "#/$defs/operation" + }, + "patch": { + "$ref": "#/$defs/operation" + }, + "trace": { "$ref": "#/$defs/operation" } }, diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 64fa7522a1..164db5c8bf 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -226,8 +226,21 @@ $defs: type: array items: $ref: '#/$defs/parameter-or-reference' - patternProperties: - '^(get|put|post|delete|options|head|patch|trace)$': + get: + $ref: '#/$defs/operation' + put: + $ref: '#/$defs/operation' + post: + $ref: '#/$defs/operation' + delete: + $ref: '#/$defs/operation' + options: + $ref: '#/$defs/operation' + head: + $ref: '#/$defs/operation' + patch: + $ref: '#/$defs/operation' + trace: $ref: '#/$defs/operation' $ref: '#/$defs/specification-extensions' unevaluatedProperties: false From ba8510a7b0a285d9b534c69b77f76672f5e47237 Mon Sep 17 00:00:00 2001 From: Arnaud Lauret Date: Thu, 6 Oct 2022 19:27:37 +0200 Subject: [PATCH 057/149] v3.1 license schema modified to describe url and identifier as mutually exclusive. Fixes #2975 (#2991) --- schemas/v3.1/schema.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 63d6e14ae2..f813d4d56b 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -105,11 +105,11 @@ $defs: format: uri required: - name - oneOf: - - required: - - identifier - - required: - - url + dependentSchemas: + identifier: + not: + required: + - url $ref: '#/$defs/specification-extensions' unevaluatedProperties: false From 157a4c81ae537ef793b2bee368bc00d88b461de8 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Thu, 13 Oct 2022 09:14:42 -0700 Subject: [PATCH 058/149] Publish v3.1 schemas version 2022-10-07 (#3042) --- schemas/v3.1/schema-base.json | 4 ++-- schemas/v3.1/schema-base.yaml | 4 ++-- schemas/v3.1/schema.json | 25 ++++++++++++------------- schemas/v3.1/schema.yaml | 2 +- tests/v3.1/test.js | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/schemas/v3.1/schema-base.json b/schemas/v3.1/schema-base.json index 04c9f60206..752e98be4e 100644 --- a/schemas/v3.1/schema-base.json +++ b/schemas/v3.1/schema-base.json @@ -1,10 +1,10 @@ { - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-02-27", + "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-10-07", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", + "$ref": "https://spec.openapis.org/oas/3.1/schema/2022-10-07", "properties": { "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } }, diff --git a/schemas/v3.1/schema-base.yaml b/schemas/v3.1/schema-base.yaml index d4fa536fde..01a5209a01 100644 --- a/schemas/v3.1/schema-base.yaml +++ b/schemas/v3.1/schema-base.yaml @@ -1,9 +1,9 @@ -$id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-02-27' +$id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-10-07' $schema: 'https://json-schema.org/draft/2020-12/schema' description: The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0 -$ref: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27' +$ref: 'https://spec.openapis.org/oas/3.1/schema/2022-10-07' properties: jsonSchemaDialect: $ref: '#/$defs/dialect' diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 45492c25a9..468bc7e5f5 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -1,5 +1,5 @@ { - "$id": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", + "$id": "https://spec.openapis.org/oas/3.1/schema/2022-10-07", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0", "type": "object", @@ -22,7 +22,9 @@ "$ref": "#/$defs/server" }, "default": [ - { "url": "/" } + { + "url": "/" + } ] }, "paths": { @@ -148,18 +150,15 @@ "required": [ "name" ], - "oneOf": [ - { - "required": [ - "identifier" - ] - }, - { - "required": [ - "url" - ] + "dependentSchemas": { + "identifier": { + "not": { + "required": [ + "url" + ] + } } - ], + }, "$ref": "#/$defs/specification-extensions", "unevaluatedProperties": false }, diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index f813d4d56b..331bba0813 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -1,4 +1,4 @@ -$id: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27' +$id: 'https://spec.openapis.org/oas/3.1/schema/2022-10-07' $schema: 'https://json-schema.org/draft/2020-12/schema' description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0 diff --git a/tests/v3.1/test.js b/tests/v3.1/test.js index e7679f5059..a8bb6b17af 100644 --- a/tests/v3.1/test.js +++ b/tests/v3.1/test.js @@ -14,7 +14,7 @@ before(async () => { JsonSchema.add(dialect); JsonSchema.add(vocabulary); JsonSchema.add(yaml.parse(fs.readFileSync(`${__dirname}/../../schemas/v3.1/schema.yaml`, "utf8"), { prettyErrors: true })); - metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2022-02-27"); + metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2022-10-07"); }); describe("v3.1 Pass", () => { From 67a6a32813aaf88012a430fb4c4540bf088a751b Mon Sep 17 00:00:00 2001 From: Darrel Date: Thu, 17 Nov 2022 11:59:08 -0500 Subject: [PATCH 059/149] Update to create next agenda on Thursday (#3065) --- .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 b3bb617ce5..b1f32e4477 100644 --- a/.github/workflows/agenda.yaml +++ b/.github/workflows/agenda.yaml @@ -11,7 +11,7 @@ name: agenda on: schedule: - - cron: '0 9 * * 1' + - cron: '0 16 * * 4' workflow_dispatch: {} jobs: From b12acf0cac85532a9d2d74462eb19f0712de38b3 Mon Sep 17 00:00:00 2001 From: Joshua O'Sullivan Date: Thu, 17 Nov 2022 17:15:48 +0000 Subject: [PATCH 060/149] Enforce documented /pets pagination size limit (#3070) --- examples/v3.0/petstore.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/v3.0/petstore.yaml b/examples/v3.0/petstore.yaml index 534bb0cd77..fa14a9781d 100644 --- a/examples/v3.0/petstore.yaml +++ b/examples/v3.0/petstore.yaml @@ -20,6 +20,7 @@ paths: required: false schema: type: integer + maximum: 100 format: int32 responses: '200': @@ -96,6 +97,7 @@ components: type: string Pets: type: array + maxItems: 100 items: $ref: "#/components/schemas/Pet" Error: From 13b04fd89e0951f175bf9eec5fd708b24c427a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Gorej?= Date: Thu, 17 Nov 2022 18:16:12 +0100 Subject: [PATCH 061/149] docs(IMPLEMENTATIONS): add openapi-runtime-expression to the list (#3067) OpenAPI Runtime Expressions parser and validator. The library was listed under 'Low-Level tooling'. --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 0152176937..df72384479 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -30,6 +30,7 @@ These tools are not endorsed by the OAI. | OpenAPI-Delphi | [github/paolo-rossi/OpenAPI-Delphi](https://github.com/paolo-rossi/OpenAPI-Delphi) | Delphi | Delphi implementation of a generator, parser and validator for the OpenAPI 3 Specification | | spring-openapi | [github/jrcodeza/spring-openapi](https://github.com/jrcodeza/spring-openapi) | Java | OpenAPI v3 generator for Java Spring. Includes also client generation. Supports inheritance with discriminators and Jackson annotations and custom interceptors. | | schema2dts | [nfroidure/schema2dts](https://github.com/nfroidure/schema2dts) | Typescript | Create types definitions from an OpenAPI schema. | +| openapi-runtime-expression | [char0n/openapi-runtime-expression](https://github.com/char0n/openapi-runtime-expression) | JavaScript | OpenAPI Runtime Expressions parser and validator. | #### Editors From d17d5c90063697896c85e73c594e01c8a42ae3b8 Mon Sep 17 00:00:00 2001 From: Christophe Dujarric Date: Thu, 17 Nov 2022 18:18:19 +0100 Subject: [PATCH 062/149] Add Bump.sh to user Interfaces list (#3071) --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index df72384479..ca74b43aae 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -57,6 +57,7 @@ These tools are not endorsed by the OAI. | angular-swagger-ui | [github/angular-swagger-ui](https://github.com/Orange-OpenSource/angular-swagger-ui) | AngularJS | An angularJS implementation of Swagger UI | | Redoc | [github/Redocly/redoc](https://github.com/Redocly/redoc) | JavaScript | A React-based renderer with deep support for OAS v2 and v3 and zero dev-dependency | | RapiDoc | [github/mrin9/RapiDoc](https://github.com/mrin9/RapiDoc) | JavaScript | A highly customizable Web Component for viewing Swagger and OpenAPI definitions | +| Bump.sh | [github/bump-sh/CLI](https://github.com/bump-sh/cli) | NodeJS | Generate documentations from OpenAPI contracts, visualize changelogs and get notified of breaking changes | #### Mock Servers From 17fa2405c5d37c91e58f47ab956f64abe6dcaf7a Mon Sep 17 00:00:00 2001 From: Octavian Date: Thu, 17 Nov 2022 19:19:46 +0200 Subject: [PATCH 063/149] Update IMPLEMENTATIONS.md (#3055) Added Oxygen OpenAPI editor --- IMPLEMENTATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index ca74b43aae..4432288763 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -36,6 +36,7 @@ These tools are not endorsed by the OAI. | Title | Project Link | Language | Description | |-------|--------------|----------|-------------| +| Oxygen OpenAPI Editor | [OpenAPI (Swagger) Editor](https://www.oxygenxml.com/openapi.html) | Java | OpenAPI editor with a variety of editing features and helper views. Support for validation and editing OpenAPI 2.0, 3.0, and 3.1 based on JSON Schema specification. Includes a tool for generating documentations and a tool for testing OpenAPIs. | | Visual Studio Code extension | [VS Code marketplace / OpenAPI (Swagger) editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi) | TypeScript | Extends VS Code to provide OpenAPI 2.0 and 3.0 navigation, code snippets, new API creation | | Apicurio Studio | [github/Apicurio/apicurio-studio](https://github.com/Apicurio/apicurio-studio) | Java/TypeScript | Web-Based **visual designer** for OpenAPI 2.0 and 3.0.0. | | KaiZen OpenAPI Editor | [github/RepreZen/KaiZen-OpenAPI-Editor](https://github.com/RepreZen/KaiZen-OpenAPI-Editor) | Java | Eclipse Editor for OpenAPI 2.0 and 3.0 | From c06c79ba2810e840ec7d14927c2d01ab713ae550 Mon Sep 17 00:00:00 2001 From: Ravi van Rooijen Date: Thu, 17 Nov 2022 18:21:06 +0100 Subject: [PATCH 064/149] Remove maxLength for operationObject/summary in the v1.2 spec (#3018) See https://github.com/OAI/OpenAPI-Specification/blob/main/versions/1.2.md#523-operation-object. The maximum of 120 characters is a "SHOULD", which according to RFC 2119 is a mere recommendation. --- schemas/v1.2/operationObject.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/v1.2/operationObject.json b/schemas/v1.2/operationObject.json index 371a6cc82c..5661251eb7 100644 --- a/schemas/v1.2/operationObject.json +++ b/schemas/v1.2/operationObject.json @@ -8,7 +8,7 @@ "required": [ "method", "nickname", "parameters" ], "properties": { "method": { "enum": [ "GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS" ] }, - "summary": { "type": "string", "maxLength": 120 }, + "summary": { "type": "string" }, "notes": { "type": "string" }, "nickname": { "type": "string", From 14cadce7edcdb398ae81f3e181a5fb2e6d495554 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:22:27 -0800 Subject: [PATCH 065/149] Update JSON example files (#3077) Co-authored-by: webron --- examples/v3.0/petstore.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/v3.0/petstore.json b/examples/v3.0/petstore.json index 583b1e0990..8571c0b0b0 100644 --- a/examples/v3.0/petstore.json +++ b/examples/v3.0/petstore.json @@ -28,6 +28,7 @@ "required": false, "schema": { "type": "integer", + "maximum": 100, "format": "int32" } } @@ -152,6 +153,7 @@ }, "Pets": { "type": "array", + "maxItems": 100, "items": { "$ref": "#/components/schemas/Pet" } From 6ece189df7611705dd3ff769103a5345a4249aa2 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 2 Mar 2023 17:57:50 +0000 Subject: [PATCH 066/149] Remove implementations list and redirect to tools.openapis.org (#3181) --- IMPLEMENTATIONS.md | 115 ++------------------------------------------- 1 file changed, 4 insertions(+), 111 deletions(-) diff --git a/IMPLEMENTATIONS.md b/IMPLEMENTATIONS.md index 4432288763..8ee1a8949a 100644 --- a/IMPLEMENTATIONS.md +++ b/IMPLEMENTATIONS.md @@ -1,116 +1,9 @@ ### Implementations -Below is a list of known tooling that implements the 3.0.0 specification. While support for the 3.0.0 specification matures, refer to the details of projects listed below for any notes about stability and roadmap. The process to improve the 3.x specification includes feedback from end-users and tooling creators. We strongly encourage draft tooling be made available for early users of OAS drafts. +The list of implementations formerly in this file is no-longer maintained here. -These tools are not endorsed by the OAI. - -#### Low-Level tooling - -| Title | Project Link | Language | Description | -|-------|--------------|----------|-------------| -| oasdiff | [github/tufin/oasdiff](https://github.com/tufin/oasdiff) | Go | Diff tool for OpenAPI 3.x specs, written as a Golang module | -| swagger-parser | [github/swagger-api](https://github.com/swagger-api/swagger-parser) | Java | Swagger 1.0, 1.1, 1.2, 2.0 to OpenAPI Specification converter | -| swagger-models | [github/swagger-api](https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-models) | Java | OpenAPI 3.0 Java Pojos | -| springdoc-openapi | [github/springdoc/springdoc-openapi](https://github.com/springdoc/springdoc-openapi) | Java | Library that produces OpenAPI 3.x specification documentation for spring-boot applications. | -| KaiZen OpenAPI Parser | [github/RepreZen/KaiZen-OpenAPI-Parser](https://github.com/RepreZen/KaiZen-OpenAPI-Parser) | Java | High-performance Parser, Validator, and Java Object Model for OpenAPI 3.x | -| openapi3-ts | [github/metadevpro/openapi3-ts](https://github.com/metadevpro/openapi3-ts) | TypeScript | TS Model & utils for OpenAPI 3.0.x contracts | -| swagger2openapi | [github/mermade/swagger2openapi](https://github.com/mermade/swagger2openapi) | Node.js | An OpenAPI / Swagger 2.0 to OpenAPI 3.0.x converter and validator | -| Microsoft.OpenApi.net | [github/microsoft/OpenApi.net](https://github.com/microsoft/openapi.net/) | dotnet | C# based parser with definition validation and migration support from V2 | -| odata-openapi | [github/oasis-tcs/odata-openapi](https://github.com/oasis-tcs/odata-openapi) | XSLT | OData 4.0 to OpenAPI 3.0.0 converter | -| openapi3_parser | [github/kevindew/openapi3_parser](https://github.com/kevindew/openapi3_parser) | Ruby | A Ruby implementation of parser and validator for the OpenAPI 3 Specification | -| oas_parser | [github/Nexmo/oas_parser](https://github.com/Nexmo/oas_parser) | Ruby | An open source OpenAPI Spec 3 Definition Parser written in Ruby | -| oas3-remote-refs | [github//OverSpeedIO/oas3-remote-refs](https://github.com/OverSpeedIO/oas3-remote-refs) | Node.js | Tool to pull remote references and merge them into the definitions of the provided OpenAPI3 specification. -| go-openapi | [github/nasa9084/go-openapi](https://github.com/nasa9084/go-openapi) | Go | Golang struct model for OpenAPI 3.x. | -| openapi | [github/wzshiming/openapi](https://github.com/wzshiming/openapi) | Go | OpenAPI 3 Specification for golang | -| kin-openapi | [github/getkin/kin-openapi](https://github.com/getkin/kin-openapi) | Go | OpenAPI 3.x implementation for Go (parsing, converting, validation) | -| openapi-go | [github/swaggest/openapi-go](https://github.com/swaggest/openapi-go) | Go | Type-safe OpenAPI 3.x bindings and generator from code | -| openapi | [sv-tools/openapi](https://github.com/sv-tools/openapi) | Go | OpenAPI v3.1 Spec implementation in Go with generics | -| Spectral | [github/stoplightio/spectral](https://github.com/stoplightio/spectral) | TypeScript, JavaScript | A flexible JSON object linter with out of the box support for OpenAPI Specification 2 and 3 | -| openapi-validator | [gitlab/mmal/openapi-validator](https://gitlab.com/mmalawski/openapi-validator) | PHP | Validates response against OpenAPI schema | -| OpenAPI-Delphi | [github/paolo-rossi/OpenAPI-Delphi](https://github.com/paolo-rossi/OpenAPI-Delphi) | Delphi | Delphi implementation of a generator, parser and validator for the OpenAPI 3 Specification | -| spring-openapi | [github/jrcodeza/spring-openapi](https://github.com/jrcodeza/spring-openapi) | Java | OpenAPI v3 generator for Java Spring. Includes also client generation. Supports inheritance with discriminators and Jackson annotations and custom interceptors. | -| schema2dts | [nfroidure/schema2dts](https://github.com/nfroidure/schema2dts) | Typescript | Create types definitions from an OpenAPI schema. | -| openapi-runtime-expression | [char0n/openapi-runtime-expression](https://github.com/char0n/openapi-runtime-expression) | JavaScript | OpenAPI Runtime Expressions parser and validator. | - -#### Editors - -| Title | Project Link | Language | Description | -|-------|--------------|----------|-------------| -| Oxygen OpenAPI Editor | [OpenAPI (Swagger) Editor](https://www.oxygenxml.com/openapi.html) | Java | OpenAPI editor with a variety of editing features and helper views. Support for validation and editing OpenAPI 2.0, 3.0, and 3.1 based on JSON Schema specification. Includes a tool for generating documentations and a tool for testing OpenAPIs. | -| Visual Studio Code extension | [VS Code marketplace / OpenAPI (Swagger) editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi) | TypeScript | Extends VS Code to provide OpenAPI 2.0 and 3.0 navigation, code snippets, new API creation | -| Apicurio Studio | [github/Apicurio/apicurio-studio](https://github.com/Apicurio/apicurio-studio) | Java/TypeScript | Web-Based **visual designer** for OpenAPI 2.0 and 3.0.0. | -| KaiZen OpenAPI Editor | [github/RepreZen/KaiZen-OpenAPI-Editor](https://github.com/RepreZen/KaiZen-OpenAPI-Editor) | Java | Eclipse Editor for OpenAPI 2.0 and 3.0 | -| RepreZen API Studio | [RepreZen.com/OpenAPI](https://www.reprezen.com/OpenAPI) | Java | Commercial desktop IDE for API design, documentation & development | -| OpenAPI-gui | [github/Mermade/openapi-gui](https://github.com/Mermade/openapi-gui) | Node.js | GUI / visual editor for creating and editing OpenAPI definitions | -| SwaggerHub | [swaggerhub.com](https://swaggerhub.com) | | API Design and Documentation Platform, Built For Teams -| swagger-editor | [github/swagger-api](https://github.com/swagger-api/swagger-editor) | JavaScript | Web-Based editor for creating, editing, validating and testing OpenAPI\Swagger definitions | -| Remain OpenAPI Studio | Direct download: https://remainsoftware.com/extranet/download-type/openapi-studio-download
Or via Eclipse MarketPlace https://marketplace.eclipse.org/content/openapi-studio-rich-oas3-editor | Java | A user-friendly, visually rich studio supporting all features defined by the OpenAPI 3. Easy but powerful UI-based components creation, API testing, import, export, code generation and much more. | - -#### User Interfaces - -| Title | Project Link | Language | Description | -|-------|--------------|----------|-------------| -| openapi-viewer | [github/koumoul/openapi-viewer](https://github.com/koumoul-dev/openapi-viewer) | Vue.js | Browse and test a REST API described with the OpenAPI 3.0 Specification. | -| swagger-ui | [github/swagger-api](https://github.com/swagger-api/swagger-UI) | JavaScript | Web-Based interface for visualizing and testing OpenAPI\Swagger definitions | -| lincoln | [github/temando/open-api-renderer](https://github.com/temando/open-api-renderer)| React.js| A React renderer for OpenAPI v3 | -| WebSphere Liberty | [Download jar](https://developer.ibm.com/wasdev/downloads/) | JavaScript | Includes a native OpenAPI v3 UI which allows for customization of its banners and URL | -| Widdershins | [github/Mermade/widdershins](https://github.com/Mermade/widdershins) | Node.js | Generate Slate/Shins markdown from OpenAPI 3.0.x | -| angular-swagger-ui | [github/angular-swagger-ui](https://github.com/Orange-OpenSource/angular-swagger-ui) | AngularJS | An angularJS implementation of Swagger UI | -| Redoc | [github/Redocly/redoc](https://github.com/Redocly/redoc) | JavaScript | A React-based renderer with deep support for OAS v2 and v3 and zero dev-dependency | -| RapiDoc | [github/mrin9/RapiDoc](https://github.com/mrin9/RapiDoc) | JavaScript | A highly customizable Web Component for viewing Swagger and OpenAPI definitions | -| Bump.sh | [github/bump-sh/CLI](https://github.com/bump-sh/cli) | NodeJS | Generate documentations from OpenAPI contracts, visualize changelogs and get notified of breaking changes | - -#### Mock Servers +You may find a more comprehensive list at https://tools.openapis.org -| Title | Project Link | Language | Description | -|-------|--------------|----------|-------------| -| API Sprout | [github/danielgtaylor/apisprout](https://github.com/danielgtaylor/apisprout) | Go | Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation | +Instructions on listing your projects are contained in https://github.com/OAI/Tooling#how-can-you-help -#### Testing tools -| Title | Project Link | Language | Description | -| ------|--------------|----------|-------------| -| Schemathesis | [github/schemathesis/schemathesis](https://github.com/schemathesis/schemathesis) | Python | A modern API testing tool for web applications built with OpenAPI and GraphQL specifications | -| Tcases for OpenAPI | [github/Cornutum/tcases](https://github.com/Cornutum/tcases/blob/master/tcases-openapi/README.md#tcases-for-openapi-from-rest-ful-to-test-ful) | Java | Generates test cases directly from an OpenAPI 3.0.X definition. Creates tests executable using various test frameworks. Bonus: Semantic linter reports elements that are inconsistent, superfluous, or dubious. | - -#### Server Implementations - -| Title | Project Link | Language | Description | -|-------|--------------|----------|-------------| -| Vert.x Web API Contract | [github/vert-x3/vertx-web](http://vertx.io/docs/#web) | Java, Kotlin, JavaScript, Groovy, Ruby, Ceylon & Scala | Create an API endpoint with Vert.x 3 and OpenAPI 3 with automatic requests validation -| Fusio | [github/apioo/fusio](https://github.com/apioo/fusio) | PHP, JavaScript | Build API endpoints based on OpenAPI 3 -| Modern | [github/modern-project/modern-ruby](https://github.com/modern-project/modern-ruby) | Ruby | OpenAPI 3-based Rack framework with automatic OAS generation and requests/response validation -| Exegesis | [github/exegesis-js/exegesis](https://github.com/exegesis-js/exegesis) | Node.js | OpenAPI 3 server-side framework for express and other frameworks. -| PHP-CRUD-API | [github/mevdschee/php-crud-api](https://github.com/mevdschee/php-crud-api) | PHP | Automatic CRUD API with OpenAPI 3 docs -| FastAPI | [github/tiangolo/fastapi](https://github.com/tiangolo/fastapi) | Python | OpenAPI 3 based, high performance, Python 3.6+ API framework with automatic data validation, serialization and great editor support. -| Fastify OpenAPI v3 | [gitlab.com/m03geek/fastify-oas](https://gitlab.com/m03geek/fastify-oas) | Node.JS | Fastify OpenAPI v3+ plugin. Generates OpenAPI specification from fastify schemas and routes. Also serves swagger ui and spec in json/yaml formats. -| openapi-backend | [github/anttiviljami/openapi-backend](https://github.com/anttiviljami/openapi-backend) | Node.js, TypeScript | Build, Validate, Route, and Mock in the backend using OpenAPI v3 spec in your favourite framework -| Connexion | [github/zalando/connexion](https://github.com/zalando/connexion) | Python | Swagger/OpenAPI First framework for Python on top of Flask with automatic endpoint validation & OAuth2 support -| JSONSchema::Validator | [https://github.com/skbkontur/perl-jsonschema-validator](https://github.com/skbkontur/perl-jsonschema-validator) | Perl | OpenAPI 3 request/response validation -| rest | [github.com/swaggest/rest](https://github.com/swaggest/rest) | Go | API server with automatic request/response mapping/validation and OpenAPI schema -| whook | [nfroidure/whook](https://github.com/nfroidure/whook) | Typescript | OpenAPI 3 based NodeJS server. | - -#### Client Implementations - -| Title | Project Link | Language | Description | -|-------|--------------|----------|-------------| -| Scorpio | [github/notEthan/scorpio](https://github.com/notEthan/Scorpio) | Ruby | OpenAPI 2 and 3 implementation offering a HTTP client library | -| openapi-client-axios | [github/anttiviljami/openapi-client-axios](https://github.com/anttiviljami/openapi-client-axios) | JavaScript, TypeScript | JavaScript client library for consuming OpenAPI-enabled APIs with axios. Types included. -| restful-react | [github/contiamo/restful-react](https://github.com/contiamo/restful-react) | Typescript | Well tested library to generate typesafe hooks and components. Easy to integrate into your development process. | -| openapi-ts-sdk-builder | [nfroidure/openapi-ts-sdk-builder](https://github.com/nfroidure/openapi-ts-sdk-builder) | Typescript | Generate a TypeScript SDK from OpenAPI 3 definitions. | -| aiopenapi3 | [github.com/commonism/aiopenapi3](https://github.com/commonism/aiopenapi3) | Python | OpenAPI 3, Python3.7+ client & validator with automatic data validation & serialization, sync or asyncio. - -#### Code Generators - -| Title | Project Link | Language | Description | -|-------|--------------|----------|-------------| -| baucis-openapi3 | [github/metadevpro/baucis-openapi3](https://github.com/metadevpro/baucis-openapi3) | Node.js | [Baucis.js](https://github.com/wprl/baucis) plugin for generating OpenAPI 3.0 compliant API contracts. | -| Google Gnostic | [github/googleapis/gnostic](https://github.com/googleapis/gnostic) | Go | Compile OpenAPI descriptions into equivalent Protocol Buffer representations. | -| Gen | [github/wzshiming/gen](https://github.com/wzshiming/gen) | Go | Generate OpenAPI 3, client, and route based on golang source code. | -| serverless-openapi-documentation | [github/temando/serverless-openapi-documentation](https://github.com/temando/serverless-openapi-documentation) | TypeScript | Serverless 1.0 plugin to generate OpenAPI V3 documentation from serverless configuration | -| zero-rails_openapi | [github/zhandao/zero-rails_openapi](https://github.com/zhandao/zero-rails_openapi) | Ruby | Provide concise DSL for generating the OpenAPI Specification 3 documentation file for Rails application | -| slush-vertx | [github/pmlopes/slush-vertx](https://github.com/pmlopes/slush-vertx) | Java, Kotlin & Groovy | Generate server skeleton for [Vert.x Web API Contract](http://vertx.io/docs/#web) and API Client based on [Vert.x 3 Web Client](http://vertx.io/docs/#web) -| WebSphere Liberty | [Download jar](https://developer.ibm.com/wasdev/downloads/) | Java EE | Generates OpenAPI v3 documentation from Java EE applications | -| swagger-node-codegen | [github/fmvilas/swagger-node-codegen](https://github.com/fmvilas/swagger-node-codegen) | Node.js | Generates a Node.js/express server, but also has a template engine for creating any templates needed. | -.NET-C#-Annotations | [github/Microsoft/OpenAPI-NET-CSharpAnnotations](https://github.com/Microsoft/OpenAPI.NET.CSharpAnnotations) | dotnet | Convert your native C# comments/annotation XML from your API code into a OpenAPI document object. | -| Object Oriented OpenAPI Specification | [github/goldspecdigital/oooas](https://github.com/goldspecdigital/oooas) | PHP | Generates OpenAPI documents using PHP. | -| swac | [github.com/swaggest/swac](https://github.com/swaggest/swac) | PHP, Go | Generates clients for Go and PHP from OpenAPI 2/3. | +These tools are not endorsed by the OAI. From a524a4cf01d6f4e6ed0acbbd7991b9663572f7be Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Sun, 5 Mar 2023 08:11:47 -0800 Subject: [PATCH 067/149] enforce existence of composite applicator keyword adjacent to "discriminator" (#3137) "The discriminator object is legal only when using one of the composite keywords oneOf, anyOf, allOf." https://spec.openapis.org/oas/v3.1.0#discriminator-object --- schemas/v3.1/meta/base.schema.json | 9 +++++++++ schemas/v3.1/meta/base.schema.yaml | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/schemas/v3.1/meta/base.schema.json b/schemas/v3.1/meta/base.schema.json index a7a59f1c7d..fdf038a38e 100644 --- a/schemas/v3.1/meta/base.schema.json +++ b/schemas/v3.1/meta/base.schema.json @@ -18,6 +18,15 @@ "externalDocs": { "$ref": "#/$defs/external-docs" }, "xml": { "$ref": "#/$defs/xml" } }, + "dependentSchemas": { + "discriminator": { + "anyOf": [ + { "required": [ "oneOf" ] }, + { "required": [ "anyOf" ] }, + { "required": [ "allOf" ] } + ] + } + }, "$defs": { "extensible": { diff --git a/schemas/v3.1/meta/base.schema.yaml b/schemas/v3.1/meta/base.schema.yaml index e2849e4115..097ec3a054 100644 --- a/schemas/v3.1/meta/base.schema.yaml +++ b/schemas/v3.1/meta/base.schema.yaml @@ -20,6 +20,12 @@ properties: $ref: '#/$defs/external-docs' xml: $ref: '#/$defs/xml' +dependentSchemas: + discriminator: + anyOf: + - required: [oneOf] + - required: [anyOf] + - required: [allOf] $defs: discriminator: From e7971e5b45100c5cc3a03707c6ad2fae23efefc9 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Sun, 5 Mar 2023 08:15:13 -0800 Subject: [PATCH 068/149] require that responses object has 'default' or a response code (fixes #2833) (#3093) ref: https://spec.openapis.org/oas/v3.1.0#responses-object --- schemas/v3.1/schema.json | 11 ++++++++++- schemas/v3.1/schema.yaml | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 468bc7e5f5..edd6d573fb 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -840,7 +840,16 @@ }, "minProperties": 1, "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false + "unevaluatedProperties": false, + "if": { + "$comment": "either default, or at least one response code property must exist", + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": false + } + }, + "then" : { + "required": [ "default" ] + } }, "response": { "$comment": "https://spec.openapis.org/oas/v3.1.0#response-object", diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 331bba0813..92b8d52c26 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -574,6 +574,12 @@ $defs: minProperties: 1 $ref: '#/$defs/specification-extensions' unevaluatedProperties: false + if: + $comment: either default, or at least one response code property must exist + patternProperties: + '^[1-5](?:[0-9]{2}|XX)$': false + then: + required: [default] response: $comment: https://spec.openapis.org/oas/v3.1.0#response-object From 87a1bd379c440948ba1355bb1a21344838362508 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 16 Mar 2023 16:57:44 +0000 Subject: [PATCH 069/149] docs: fix anchor links in rendered specs (#3200) Signed-off-by: Mike Ralphson --- scripts/md2html/md2html.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/md2html/md2html.js b/scripts/md2html/md2html.js index ae7a501967..147e33f62a 100644 --- a/scripts/md2html/md2html.js +++ b/scripts/md2html/md2html.js @@ -76,7 +76,10 @@ function preface(title,options) { if (options.respec) { preface += ''; preface += ``; - preface += fs.readFileSync('./analytics/google.html','utf8'); + try { + preface += fs.readFileSync('./analytics/google.html','utf8'); + } + catch (ex) {} preface += ''; preface += '