@swagger-api/apidom-ns-openapi-3-1 1.11.3 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +43 -39
- package/dist/apidom-ns-openapi-3-1.browser.js +4 -4
- package/dist/apidom-ns-openapi-3-1.browser.min.js +2 -2
- package/package.json +9 -8
- package/src/elements/Schema.cjs +1 -1
- package/src/elements/Schema.mjs +1 -1
- package/src/media-types.cjs +2 -2
- package/src/media-types.mjs +2 -2
- package/src/refractor/plugins/normalize-parameters.cjs +1 -1
- package/src/refractor/plugins/normalize-parameters.mjs +1 -1
- package/types/apidom-ns-openapi-3-1.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.12.1](https://github.com/swagger-api/apidom/compare/v1.12.0...v1.12.1) (2026-09-04)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **build:** add npm provenance to all package publishConfig ([#5228](https://github.com/swagger-api/apidom/issues/5228)) ([5437816](https://github.com/swagger-api/apidom/commit/5437816502aead06b9e9c1a7bbe4de9e5d86c0dc))
|
|
11
|
+
- **media-types:** detect OpenAPI 3.1.1 and 3.1.2 media types ([#5220](https://github.com/swagger-api/apidom/issues/5220)) ([f28b846](https://github.com/swagger-api/apidom/commit/f28b8464d5dd10ae1de68ca1eecbf7210ec0037e))
|
|
12
|
+
|
|
13
|
+
### Reverts
|
|
14
|
+
|
|
15
|
+
- Revert "chore(release): cut the v1.12.1 release [skip ci]" (#5227) ([7357915](https://github.com/swagger-api/apidom/commit/7357915793963cf518411ceb149a58c8965ec9c7)), closes [#5227](https://github.com/swagger-api/apidom/issues/5227)
|
|
16
|
+
|
|
17
|
+
# [1.12.0](https://github.com/swagger-api/apidom/compare/v1.11.3...v1.12.0) (2026-08-03)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @swagger-api/apidom-ns-openapi-3-1
|
|
20
|
+
|
|
6
21
|
## [1.11.3](https://github.com/swagger-api/apidom/compare/v1.11.2...v1.11.3) (2026-06-22)
|
|
7
22
|
|
|
8
23
|
**Note:** Version bump only for package @swagger-api/apidom-ns-openapi-3-1
|
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# @swagger-api/apidom-ns-openapi-3-1
|
|
2
2
|
|
|
3
|
-
`@swagger-api/apidom-ns-openapi-3-1` contains ApiDOM namespace
|
|
3
|
+
`@swagger-api/apidom-ns-openapi-3-1` contains ApiDOM namespace supports following OpenAPI specification versions:
|
|
4
|
+
|
|
5
|
+
- [OpenAPI 3.1.2 specification](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md)
|
|
6
|
+
- [OpenAPI 3.1.1 specification](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md)
|
|
7
|
+
- [OpenAPI 3.1.0 specification](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md)
|
|
4
8
|
|
|
5
9
|
## Installation
|
|
6
10
|
|
|
@@ -439,7 +443,7 @@ toValue(openApiElement);
|
|
|
439
443
|
- Does not apply to parameters defined under `components`.
|
|
440
444
|
- `parameter.examples` has precedence over deprecated `parameter.example`.
|
|
441
445
|
|
|
442
|
-
```js
|
|
446
|
+
```js
|
|
443
447
|
import { toValue } from '@swagger-api/apidom-core';
|
|
444
448
|
import { OpenApi3_1Element, refractorPluginNormalizeParameterExamples } from '@swagger-api/apidom-ns-openapi-3-1';
|
|
445
449
|
import { parse } from '@swagger-api/apidom-parser-adapter-yaml-1-2';
|
|
@@ -461,7 +465,7 @@ paths:
|
|
|
461
465
|
|
|
462
466
|
const apiDOM = await parse(yamlDefinition);
|
|
463
467
|
|
|
464
|
-
//default
|
|
468
|
+
//default
|
|
465
469
|
const openApiElement = OpenApi3_1Element.refract(apiDOM.result, {
|
|
466
470
|
plugins: [refractorPluginNormalizeParameterExamples()],
|
|
467
471
|
});
|
|
@@ -519,7 +523,7 @@ toValue(openApiElementWithCustomField);
|
|
|
519
523
|
- Does not apply to headers defined under `components`.
|
|
520
524
|
- `header.examples` has precedence over deprecated `header.example`.
|
|
521
525
|
|
|
522
|
-
```js
|
|
526
|
+
```js
|
|
523
527
|
import { toValue } from '@swagger-api/apidom-core';
|
|
524
528
|
import { OpenApi3_1Element, refractorPluginNormalizeHeaderExamples } from '@swagger-api/apidom-ns-openapi-3-1';
|
|
525
529
|
import { parse } from '@swagger-api/apidom-parser-adapter-yaml-1-2';
|
|
@@ -606,14 +610,14 @@ toValue(openApiElementWithCustomField);
|
|
|
606
610
|
This plugin normalizes the `discriminator.mapping` field in a Schema Object by:
|
|
607
611
|
|
|
608
612
|
- Converting mapping values into inline Schema Objects when possible.
|
|
609
|
-
- Adding missing mapping entries based on the schema's `oneOf`, `anyOf`, or a prepared `allOf` mapping. The `allOf` mapping
|
|
613
|
+
- Adding missing mapping entries based on the schema's `oneOf`, `anyOf`, or a prepared `allOf` mapping. The `allOf` mapping
|
|
610
614
|
is created based on the schemas defined in `components.schemas` during dereferencing.
|
|
611
615
|
|
|
612
616
|
The `discriminator.mapping` field is not modified by the plugin.
|
|
613
617
|
|
|
614
|
-
This plugin is intended to run on dereferenced OpenAPI 3.1 documents. During dereferencing Schema Objects are annotated with meta properties and the `allOf` mapping is created for Schema Objects defined in `components.schemas`.
|
|
618
|
+
This plugin is intended to run on dereferenced OpenAPI 3.1 documents. During dereferencing Schema Objects are annotated with meta properties and the `allOf` mapping is created for Schema Objects defined in `components.schemas`.
|
|
615
619
|
|
|
616
|
-
```json
|
|
620
|
+
```json
|
|
617
621
|
|
|
618
622
|
// fixture-example.json
|
|
619
623
|
{
|
|
@@ -677,7 +681,7 @@ This plugin is intended to run on dereferenced OpenAPI 3.1 documents. During der
|
|
|
677
681
|
}
|
|
678
682
|
```
|
|
679
683
|
|
|
680
|
-
```js
|
|
684
|
+
```js
|
|
681
685
|
import { toValue, dispatchRefractorPlugins } from '@swagger-api/apidom-core';
|
|
682
686
|
import { dereference } from '@swagger-api/apidom-reference';
|
|
683
687
|
import FileResolver from '@swagger-api/apidom-reference/resolve/resolvers/file';
|
|
@@ -708,7 +712,7 @@ const normalized = dispatchRefractorPlugins(
|
|
|
708
712
|
);
|
|
709
713
|
toValue(normalized)
|
|
710
714
|
|
|
711
|
-
// =>
|
|
715
|
+
// =>
|
|
712
716
|
// {
|
|
713
717
|
// openapi: '3.1.0',
|
|
714
718
|
// components: {
|
|
@@ -806,33 +810,33 @@ toValue(normalized)
|
|
|
806
810
|
|
|
807
811
|
Only fully implemented specification objects should be checked here.
|
|
808
812
|
|
|
809
|
-
- [x] [OpenAPI Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
810
|
-
- [x] [Info Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
811
|
-
- [x] [Contact Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
812
|
-
- [x] [License Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
813
|
-
- [x] [Server Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
814
|
-
- [x] [Server Variable Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
815
|
-
- [x] [Components](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
816
|
-
- [x] [Paths Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
817
|
-
- [x] [Path Item Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
818
|
-
- [x] [Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
819
|
-
- [x] [External Documentation Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
820
|
-
- [x] [Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
821
|
-
- [x] [Request Body Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
822
|
-
- [x] [Media Type Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
823
|
-
- [x] [Encoding Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
824
|
-
- [x] [Responses Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
825
|
-
- [x] [Callback Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
826
|
-
- [x] [Example Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
827
|
-
- [x] [Link Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
828
|
-
- [x] [Header Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
829
|
-
- [x] [Tag Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
830
|
-
- [x] [Reference Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
831
|
-
- [x] [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
832
|
-
- [x] [Discriminator Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
833
|
-
- [x] [XML Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
834
|
-
- [x] [Security Scheme Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
835
|
-
- [x] [OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
836
|
-
- [x] [OAuth Flow Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
837
|
-
- [x] [Security Requirement Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
838
|
-
- [x] [Specification extensions](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
813
|
+
- [x] [OpenAPI Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#openapi-object)
|
|
814
|
+
- [x] [Info Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#info-object)
|
|
815
|
+
- [x] [Contact Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#contact-object)
|
|
816
|
+
- [x] [License Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#license-object)
|
|
817
|
+
- [x] [Server Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#server-object)
|
|
818
|
+
- [x] [Server Variable Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#server-variable-object)
|
|
819
|
+
- [x] [Components](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#components-object)
|
|
820
|
+
- [x] [Paths Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#paths-object)
|
|
821
|
+
- [x] [Path Item Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#path-item-object)
|
|
822
|
+
- [x] [Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#operation-object)
|
|
823
|
+
- [x] [External Documentation Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#external-documentation-object)
|
|
824
|
+
- [x] [Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#parameter-object)
|
|
825
|
+
- [x] [Request Body Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#request-body-object)
|
|
826
|
+
- [x] [Media Type Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#media-type-object)
|
|
827
|
+
- [x] [Encoding Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#encoding-object)
|
|
828
|
+
- [x] [Responses Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#responses-object)
|
|
829
|
+
- [x] [Callback Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#callback-object)
|
|
830
|
+
- [x] [Example Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#example-object)
|
|
831
|
+
- [x] [Link Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#link-object)
|
|
832
|
+
- [x] [Header Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#header-object)
|
|
833
|
+
- [x] [Tag Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#tag-object)
|
|
834
|
+
- [x] [Reference Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#reference-object)
|
|
835
|
+
- [x] [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#schema-object)
|
|
836
|
+
- [x] [Discriminator Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#discriminator-object)
|
|
837
|
+
- [x] [XML Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#xml-object)
|
|
838
|
+
- [x] [Security Scheme Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#security-scheme-object)
|
|
839
|
+
- [x] [OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#oauth-flows-object)
|
|
840
|
+
- [x] [OAuth Flow Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#oauth-flow-object)
|
|
841
|
+
- [x] [Security Requirement Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#security-requirement-object)
|
|
842
|
+
- [x] [Specification extensions](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#specification-extensions)
|
|
@@ -11191,7 +11191,7 @@
|
|
|
11191
11191
|
const effectiveFormat = format === "generic" ? "openapi;version" : format;
|
|
11192
11192
|
return this.filter((mediaType) => mediaType.includes(effectiveFormat));
|
|
11193
11193
|
}
|
|
11194
|
-
findBy(version = "3.1.
|
|
11194
|
+
findBy(version = "3.1.2", format = "generic") {
|
|
11195
11195
|
const search = format === "generic" ? `vnd.oai.openapi;version=${version}` : `vnd.oai.openapi+${format};version=${version}`;
|
|
11196
11196
|
return this.find((mediaType) => mediaType.includes(search)) || this.unknownMediaType;
|
|
11197
11197
|
}
|
|
@@ -11202,7 +11202,7 @@
|
|
|
11202
11202
|
/**
|
|
11203
11203
|
* @public
|
|
11204
11204
|
*/
|
|
11205
|
-
var mediaTypes = new OpenAPIMediaTypes("application/vnd.oai.openapi;version=3.1.0", "application/vnd.oai.openapi+json;version=3.1.0", "application/vnd.oai.openapi+yaml;version=3.1.0");
|
|
11205
|
+
var mediaTypes = new OpenAPIMediaTypes("application/vnd.oai.openapi;version=3.1.0", "application/vnd.oai.openapi+json;version=3.1.0", "application/vnd.oai.openapi+yaml;version=3.1.0", "application/vnd.oai.openapi;version=3.1.1", "application/vnd.oai.openapi+json;version=3.1.1", "application/vnd.oai.openapi+yaml;version=3.1.1", "application/vnd.oai.openapi;version=3.1.2", "application/vnd.oai.openapi+json;version=3.1.2", "application/vnd.oai.openapi+yaml;version=3.1.2");
|
|
11206
11206
|
//#endregion
|
|
11207
11207
|
//#region ../apidom-ns-openapi-3-0/src/elements/Callback.mjs
|
|
11208
11208
|
/**
|
|
@@ -20135,7 +20135,7 @@
|
|
|
20135
20135
|
/**
|
|
20136
20136
|
* OAS base vocabulary
|
|
20137
20137
|
*
|
|
20138
|
-
* URI: https://github.com/OAI/OpenAPI-Specification/blob/
|
|
20138
|
+
* URI: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#base-vocabulary
|
|
20139
20139
|
*/
|
|
20140
20140
|
get discriminator() {
|
|
20141
20141
|
return this.get("discriminator");
|
|
@@ -20871,7 +20871,7 @@
|
|
|
20871
20871
|
/**
|
|
20872
20872
|
* Establishes identity between two Parameter Objects.
|
|
20873
20873
|
*
|
|
20874
|
-
* {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
20874
|
+
* {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#operation-parameters}
|
|
20875
20875
|
*/
|
|
20876
20876
|
const parameterEquals = (parameter1, parameter2) => {
|
|
20877
20877
|
if (!predicates.isParameterElement(parameter1)) return false;
|
|
@@ -4038,14 +4038,14 @@
|
|
|
4038
4038
|
const t = "generic" === e ? "openapi;version" : e;
|
|
4039
4039
|
return this.filter(((e) => e.includes(t)));
|
|
4040
4040
|
}
|
|
4041
|
-
findBy(e = "3.1.
|
|
4041
|
+
findBy(e = "3.1.2", t = "generic") {
|
|
4042
4042
|
const s = "generic" === t ? `vnd.oai.openapi;version=${e}` : `vnd.oai.openapi+${t};version=${e}`;
|
|
4043
4043
|
return this.find(((e) => e.includes(s))) || this.unknownMediaType;
|
|
4044
4044
|
}
|
|
4045
4045
|
latest(e = "generic") {
|
|
4046
4046
|
return it(this.filterByFormat(e));
|
|
4047
4047
|
}
|
|
4048
|
-
}, ec = new Qa("application/vnd.oai.openapi;version=3.1.0", "application/vnd.oai.openapi+json;version=3.1.0", "application/vnd.oai.openapi+yaml;version=3.1.0"), tc = class extends On.ObjectElement {
|
|
4048
|
+
}, ec = new Qa("application/vnd.oai.openapi;version=3.1.0", "application/vnd.oai.openapi+json;version=3.1.0", "application/vnd.oai.openapi+yaml;version=3.1.0", "application/vnd.oai.openapi;version=3.1.1", "application/vnd.oai.openapi+json;version=3.1.1", "application/vnd.oai.openapi+yaml;version=3.1.1", "application/vnd.oai.openapi;version=3.1.2", "application/vnd.oai.openapi+json;version=3.1.2", "application/vnd.oai.openapi+yaml;version=3.1.2"), tc = class extends On.ObjectElement {
|
|
4049
4049
|
constructor(e, t, s) {
|
|
4050
4050
|
super(e, t, s), this.element = "callback";
|
|
4051
4051
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swagger-api/apidom-ns-openapi-3-1",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "OpenAPI 3.1.x namespace for ApiDOM.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
|
-
"registry": "https://registry.npmjs.org"
|
|
7
|
+
"registry": "https://registry.npmjs.org",
|
|
8
|
+
"provenance": true
|
|
8
9
|
},
|
|
9
10
|
"type": "module",
|
|
10
11
|
"sideEffects": [
|
|
@@ -45,11 +46,11 @@
|
|
|
45
46
|
"license": "Apache-2.0",
|
|
46
47
|
"dependencies": {
|
|
47
48
|
"@babel/runtime-corejs3": "^7.26.10",
|
|
48
|
-
"@swagger-api/apidom-ast": "^1.
|
|
49
|
-
"@swagger-api/apidom-core": "^1.
|
|
50
|
-
"@swagger-api/apidom-json-pointer": "^1.
|
|
51
|
-
"@swagger-api/apidom-ns-json-schema-2020-12": "^1.
|
|
52
|
-
"@swagger-api/apidom-ns-openapi-3-0": "^1.
|
|
49
|
+
"@swagger-api/apidom-ast": "^1.12.1",
|
|
50
|
+
"@swagger-api/apidom-core": "^1.12.1",
|
|
51
|
+
"@swagger-api/apidom-json-pointer": "^1.12.1",
|
|
52
|
+
"@swagger-api/apidom-ns-json-schema-2020-12": "^1.12.1",
|
|
53
|
+
"@swagger-api/apidom-ns-openapi-3-0": "^1.12.1",
|
|
53
54
|
"@types/ramda": "~0.30.0",
|
|
54
55
|
"ramda": "~0.30.0",
|
|
55
56
|
"ramda-adjunct": "^5.0.0",
|
|
@@ -65,5 +66,5 @@
|
|
|
65
66
|
"README.md",
|
|
66
67
|
"CHANGELOG.md"
|
|
67
68
|
],
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "219d365159f147e6068c56ff06d57ce2ce9297f6"
|
|
69
70
|
}
|
package/src/elements/Schema.cjs
CHANGED
|
@@ -15,7 +15,7 @@ class Schema extends _apidomNsJsonSchema.JSONSchemaElement {
|
|
|
15
15
|
/**
|
|
16
16
|
* OAS base vocabulary
|
|
17
17
|
*
|
|
18
|
-
* URI: https://github.com/OAI/OpenAPI-Specification/blob/
|
|
18
|
+
* URI: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#base-vocabulary
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
get discriminator() {
|
package/src/elements/Schema.mjs
CHANGED
|
@@ -11,7 +11,7 @@ class Schema extends JSONSchemaElement {
|
|
|
11
11
|
/**
|
|
12
12
|
* OAS base vocabulary
|
|
13
13
|
*
|
|
14
|
-
* URI: https://github.com/OAI/OpenAPI-Specification/blob/
|
|
14
|
+
* URI: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#base-vocabulary
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
get discriminator() {
|
package/src/media-types.cjs
CHANGED
|
@@ -16,7 +16,7 @@ class OpenAPIMediaTypes extends _apidomCore.MediaTypes {
|
|
|
16
16
|
const effectiveFormat = format === 'generic' ? 'openapi;version' : format;
|
|
17
17
|
return this.filter(mediaType => mediaType.includes(effectiveFormat));
|
|
18
18
|
}
|
|
19
|
-
findBy(version = '3.1.
|
|
19
|
+
findBy(version = '3.1.2', format = 'generic') {
|
|
20
20
|
const search = format === 'generic' ? `vnd.oai.openapi;version=${version}` : `vnd.oai.openapi+${format};version=${version}`;
|
|
21
21
|
const found = this.find(mediaType => mediaType.includes(search));
|
|
22
22
|
return found || this.unknownMediaType;
|
|
@@ -30,5 +30,5 @@ class OpenAPIMediaTypes extends _apidomCore.MediaTypes {
|
|
|
30
30
|
* @public
|
|
31
31
|
*/
|
|
32
32
|
exports.OpenAPIMediaTypes = OpenAPIMediaTypes;
|
|
33
|
-
const mediaTypes = new OpenAPIMediaTypes('application/vnd.oai.openapi;version=3.1.0', 'application/vnd.oai.openapi+json;version=3.1.0', 'application/vnd.oai.openapi+yaml;version=3.1.0');
|
|
33
|
+
const mediaTypes = new OpenAPIMediaTypes('application/vnd.oai.openapi;version=3.1.0', 'application/vnd.oai.openapi+json;version=3.1.0', 'application/vnd.oai.openapi+yaml;version=3.1.0', 'application/vnd.oai.openapi;version=3.1.1', 'application/vnd.oai.openapi+json;version=3.1.1', 'application/vnd.oai.openapi+yaml;version=3.1.1', 'application/vnd.oai.openapi;version=3.1.2', 'application/vnd.oai.openapi+json;version=3.1.2', 'application/vnd.oai.openapi+yaml;version=3.1.2');
|
|
34
34
|
var _default = exports.default = mediaTypes;
|
package/src/media-types.mjs
CHANGED
|
@@ -13,7 +13,7 @@ export class OpenAPIMediaTypes extends MediaTypes {
|
|
|
13
13
|
const effectiveFormat = format === 'generic' ? 'openapi;version' : format;
|
|
14
14
|
return this.filter(mediaType => mediaType.includes(effectiveFormat));
|
|
15
15
|
}
|
|
16
|
-
findBy(version = '3.1.
|
|
16
|
+
findBy(version = '3.1.2', format = 'generic') {
|
|
17
17
|
const search = format === 'generic' ? `vnd.oai.openapi;version=${version}` : `vnd.oai.openapi+${format};version=${version}`;
|
|
18
18
|
const found = this.find(mediaType => mediaType.includes(search));
|
|
19
19
|
return found || this.unknownMediaType;
|
|
@@ -26,5 +26,5 @@ export class OpenAPIMediaTypes extends MediaTypes {
|
|
|
26
26
|
/**
|
|
27
27
|
* @public
|
|
28
28
|
*/
|
|
29
|
-
const mediaTypes = new OpenAPIMediaTypes('application/vnd.oai.openapi;version=3.1.0', 'application/vnd.oai.openapi+json;version=3.1.0', 'application/vnd.oai.openapi+yaml;version=3.1.0');
|
|
29
|
+
const mediaTypes = new OpenAPIMediaTypes('application/vnd.oai.openapi;version=3.1.0', 'application/vnd.oai.openapi+json;version=3.1.0', 'application/vnd.oai.openapi+yaml;version=3.1.0', 'application/vnd.oai.openapi;version=3.1.1', 'application/vnd.oai.openapi+json;version=3.1.1', 'application/vnd.oai.openapi+yaml;version=3.1.1', 'application/vnd.oai.openapi;version=3.1.2', 'application/vnd.oai.openapi+json;version=3.1.2', 'application/vnd.oai.openapi+yaml;version=3.1.2');
|
|
30
30
|
export default mediaTypes;
|
|
@@ -34,7 +34,7 @@ const plugin = ({
|
|
|
34
34
|
/**
|
|
35
35
|
* Establishes identity between two Parameter Objects.
|
|
36
36
|
*
|
|
37
|
-
* {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
37
|
+
* {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#operation-parameters}
|
|
38
38
|
*/
|
|
39
39
|
const parameterEquals = (parameter1, parameter2) => {
|
|
40
40
|
if (!predicates.isParameterElement(parameter1)) return false;
|
|
@@ -28,7 +28,7 @@ const plugin = ({
|
|
|
28
28
|
/**
|
|
29
29
|
* Establishes identity between two Parameter Objects.
|
|
30
30
|
*
|
|
31
|
-
* {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.
|
|
31
|
+
* {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#operation-parameters}
|
|
32
32
|
*/
|
|
33
33
|
const parameterEquals = (parameter1, parameter2) => {
|
|
34
34
|
if (!predicates.isParameterElement(parameter1)) return false;
|
|
@@ -1851,7 +1851,7 @@ export declare class SchemaElement extends JSONSchemaElement {
|
|
|
1851
1851
|
/**
|
|
1852
1852
|
* OAS base vocabulary
|
|
1853
1853
|
*
|
|
1854
|
-
* URI: https://github.com/OAI/OpenAPI-Specification/blob/
|
|
1854
|
+
* URI: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#base-vocabulary
|
|
1855
1855
|
*/
|
|
1856
1856
|
get discriminator(): DiscriminatorElement | undefined;
|
|
1857
1857
|
set discriminator(discriminator: DiscriminatorElement | undefined);
|