swagger-client 3.32.4 → 3.33.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.
@@ -13,7 +13,7 @@ export const isOpenAPI30 = spec => {
13
13
  const {
14
14
  openapi
15
15
  } = spec;
16
- return typeof openapi === 'string' && /^3\.0\.([0123])(?:-rc[012])?$/.test(openapi);
16
+ return typeof openapi === 'string' && /^3\.0\.(?:[1-9]\d*|0)$/.test(openapi);
17
17
  } catch {
18
18
  return false;
19
19
  }
package/es/index.js CHANGED
@@ -109,6 +109,7 @@ Swagger.prototype = {
109
109
  useCircularStructures: this.useCircularStructures,
110
110
  requestInterceptor: this.requestInterceptor || null,
111
111
  responseInterceptor: this.responseInterceptor || null,
112
+ pathDiscriminator: this.pathDiscriminator || [],
112
113
  skipNormalization: this.skipNormalization || false,
113
114
  ...options
114
115
  }).then(obj => {
@@ -149,7 +149,7 @@ const resolveOpenAPI31Strategy = async options => {
149
149
  } catch (error) {
150
150
  if (error instanceof InvalidJsonPointerError || error instanceof EvaluationJsonPointerError) {
151
151
  return {
152
- spec: null,
152
+ spec,
153
153
  errors: []
154
154
  };
155
155
  }
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This is useful for cases where resolving your entire object is unnecessary
16
16
  // and/or non-performant; we use this interface for lazily resolving operations
17
- // and models in Swagger-UI, which allows us to handle larger definitions.
17
+ // and models in Swagger-UI, which allows us to handle larger OpenAPI descriptions.
18
18
  //
19
19
  // It's likely that Swagger-Client will rely entirely on lazy resolving in
20
20
  // future versions.
@@ -18,7 +18,7 @@ const isOpenAPI30 = spec => {
18
18
  const {
19
19
  openapi
20
20
  } = spec;
21
- return typeof openapi === 'string' && /^3\.0\.([0123])(?:-rc[012])?$/.test(openapi);
21
+ return typeof openapi === 'string' && /^3\.0\.(?:[1-9]\d*|0)$/.test(openapi);
22
22
  } catch {
23
23
  return false;
24
24
  }
package/lib/index.js CHANGED
@@ -116,6 +116,7 @@ Swagger.prototype = {
116
116
  useCircularStructures: this.useCircularStructures,
117
117
  requestInterceptor: this.requestInterceptor || null,
118
118
  responseInterceptor: this.responseInterceptor || null,
119
+ pathDiscriminator: this.pathDiscriminator || [],
119
120
  skipNormalization: this.skipNormalization || false,
120
121
  ...options
121
122
  }).then(obj => {
@@ -157,7 +157,7 @@ const resolveOpenAPI31Strategy = async options => {
157
157
  } catch (error) {
158
158
  if (error instanceof _apidomJsonPointer.InvalidJsonPointerError || error instanceof _apidomJsonPointer.EvaluationJsonPointerError) {
159
159
  return {
160
- spec: null,
160
+ spec,
161
161
  errors: []
162
162
  };
163
163
  }
@@ -24,7 +24,7 @@ var _openapiPredicates = require("../helpers/openapi-predicates.js");
24
24
  //
25
25
  // This is useful for cases where resolving your entire object is unnecessary
26
26
  // and/or non-performant; we use this interface for lazily resolving operations
27
- // and models in Swagger-UI, which allows us to handle larger definitions.
27
+ // and models in Swagger-UI, which allows us to handle larger OpenAPI descriptions.
28
28
  //
29
29
  // It's likely that Swagger-Client will rely entirely on lazy resolving in
30
30
  // future versions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swagger-client",
3
- "version": "3.32.4",
3
+ "version": "3.33.1",
4
4
  "description": "SwaggerJS - a collection of interfaces for OAI specs",
5
5
  "browser": {
6
6
  "./src/helpers/btoa.node.js": "./src/helpers/btoa.browser.js",
@@ -74,11 +74,11 @@
74
74
  "dependencies": {
75
75
  "@babel/runtime-corejs3": "^7.22.15",
76
76
  "@scarf/scarf": "=1.4.0",
77
- "@swagger-api/apidom-core": ">=1.0.0-beta.3 <1.0.0-rc.0",
78
- "@swagger-api/apidom-error": ">=1.0.0-beta.3 <1.0.0-rc.0",
79
- "@swagger-api/apidom-json-pointer": ">=1.0.0-beta.3 <1.0.0-rc.0",
80
- "@swagger-api/apidom-ns-openapi-3-1": ">=1.0.0-beta.3 <1.0.0-rc.0",
81
- "@swagger-api/apidom-reference": ">=1.0.0-beta.3 <1.0.0-rc.0",
77
+ "@swagger-api/apidom-core": ">=1.0.0-beta.6 <1.0.0-rc.0",
78
+ "@swagger-api/apidom-error": ">=1.0.0-beta.6 <1.0.0-rc.0",
79
+ "@swagger-api/apidom-json-pointer": ">=1.0.0-beta.6 <1.0.0-rc.0",
80
+ "@swagger-api/apidom-ns-openapi-3-1": ">=1.0.0-beta.6 <1.0.0-rc.0",
81
+ "@swagger-api/apidom-reference": ">=1.0.0-beta.6 <1.0.0-rc.0",
82
82
  "cookie": "~0.7.2",
83
83
  "deepmerge": "~4.3.0",
84
84
  "fast-json-patch": "^3.0.0-1",
@@ -116,7 +116,7 @@
116
116
  "jest-environment-jsdom": "^29.0.3",
117
117
  "json-loader": "=0.5.7",
118
118
  "license-checker": "=25.0.1",
119
- "lint-staged": "=15.2.11",
119
+ "lint-staged": "=15.3.0",
120
120
  "lodash": "^4.17.21",
121
121
  "npm-run-all": "=4.1.5",
122
122
  "prettier": "^3.1.1",