@swagger-api/apidom-ns-openapi-2 0.85.0 → 0.86.0

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.
@@ -4,6 +4,7 @@ class OperationTags extends ArrayElement {
4
4
  constructor(content, meta, attributes) {
5
5
  super(content, meta, attributes);
6
6
  this.classes.push(OperationTags.primaryClass);
7
+ this.classes.push('tags');
7
8
  }
8
9
  }
9
10
  export default OperationTags;
@@ -2,6 +2,8 @@ import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/
2
2
  import FallbackVisitor from "./visitors/FallbackVisitor.mjs";
3
3
  import SwaggerVisitor from "./visitors/open-api-2/index.mjs";
4
4
  import SwaggerSwaggerVisitor from "./visitors/open-api-2/SwaggerVisitor.mjs";
5
+ import SwaggerHostVisitor from "./visitors/open-api-2/HostVisitor.mjs";
6
+ import SwaggerBasePathVisitor from "./visitors/open-api-2/BasePathVisitor.mjs";
5
7
  import SwaggerSchemesVisitor from "./visitors/open-api-2/SchemesVisitor.mjs";
6
8
  import SwaggerConsumesVisitor from "./visitors/open-api-2/ConsumesVisitor.mjs";
7
9
  import SwaggerProducesVisitor from "./visitors/open-api-2/ProducesVisitor.mjs";
@@ -77,12 +79,8 @@ const specification = {
77
79
  info: {
78
80
  $ref: '#/visitors/document/objects/Info'
79
81
  },
80
- host: {
81
- $ref: '#/visitors/value'
82
- },
83
- basePath: {
84
- $ref: '#/visitors/value'
85
- },
82
+ host: SwaggerHostVisitor,
83
+ basePath: SwaggerBasePathVisitor,
86
84
  schemes: SwaggerSchemesVisitor,
87
85
  consumes: SwaggerConsumesVisitor,
88
86
  produces: SwaggerProducesVisitor,
@@ -0,0 +1,13 @@
1
+ import stampit from 'stampit';
2
+ import { BREAK, cloneDeep } from '@swagger-api/apidom-core';
3
+ import FallbackVisitor from "../FallbackVisitor.mjs";
4
+ const BasePathVisitor = stampit(FallbackVisitor, {
5
+ methods: {
6
+ StringElement(stringElement) {
7
+ this.element = cloneDeep(stringElement);
8
+ this.element.classes.push('swagger-base-path');
9
+ return BREAK;
10
+ }
11
+ }
12
+ });
13
+ export default BasePathVisitor;
@@ -0,0 +1,13 @@
1
+ import stampit from 'stampit';
2
+ import { BREAK, cloneDeep } from '@swagger-api/apidom-core';
3
+ import FallbackVisitor from "../FallbackVisitor.mjs";
4
+ const HostVisitor = stampit(FallbackVisitor, {
5
+ methods: {
6
+ StringElement(stringElement) {
7
+ this.element = cloneDeep(stringElement);
8
+ this.element.classes.push('swagger-host');
9
+ return BREAK;
10
+ }
11
+ }
12
+ });
13
+ export default HostVisitor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swagger-api/apidom-ns-openapi-2",
3
- "version": "0.85.0",
3
+ "version": "0.86.0",
4
4
  "description": "OpenAPI 2.0 namespace for ApiDOM.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -42,9 +42,9 @@
42
42
  "license": "Apache-2.0",
43
43
  "dependencies": {
44
44
  "@babel/runtime-corejs3": "^7.20.7",
45
- "@swagger-api/apidom-core": "^0.85.0",
46
- "@swagger-api/apidom-error": "^0.85.0",
47
- "@swagger-api/apidom-ns-json-schema-draft-4": "^0.85.0",
45
+ "@swagger-api/apidom-core": "^0.86.0",
46
+ "@swagger-api/apidom-error": "^0.86.0",
47
+ "@swagger-api/apidom-ns-json-schema-draft-4": "^0.86.0",
48
48
  "@types/ramda": "~0.29.6",
49
49
  "ramda": "~0.29.1",
50
50
  "ramda-adjunct": "^4.1.1",
@@ -60,5 +60,5 @@
60
60
  "README.md",
61
61
  "CHANGELOG.md"
62
62
  ],
63
- "gitHead": "beedab14f203c2b029ff83d4c6532669b0783aa1"
63
+ "gitHead": "13eb0bd9d45950dfa21a65bc4bc8ac608e0802d0"
64
64
  }
package/types/dist.d.ts CHANGED
@@ -53,12 +53,8 @@ declare const specification: {
53
53
  info: {
54
54
  $ref: string;
55
55
  };
56
- host: {
57
- $ref: string;
58
- };
59
- basePath: {
60
- $ref: string;
61
- };
56
+ host: stampit.default.Stamp<any>;
57
+ basePath: stampit.default.Stamp<any>;
62
58
  schemes: stampit.default.Stamp<any>;
63
59
  consumes: stampit.default.Stamp<any>;
64
60
  produces: stampit.default.Stamp<any>;