Skip to content

chore(deps): update dependency swagger-client to v3#25

Open
tahriabd wants to merge 1 commit intomasterfrom
renovate/swagger-client-3.x
Open

chore(deps): update dependency swagger-client to v3#25
tahriabd wants to merge 1 commit intomasterfrom
renovate/swagger-client-3.x

Conversation

@tahriabd
Copy link
Owner

@tahriabd tahriabd commented Jan 5, 2020

This PR contains the following updates:

Package Type Update Change
swagger-client devDependencies major ^2.1.28 -> ^3.0.0

Release Notes

swagger-api/swagger-js

v3.9.6

Compare Source

Changelog
  • housekeeping: npm audit fix (#​1484)

v3.9.5

Compare Source

Changelog
  • improvement: send Accept: application/json, application/yaml for all document fetches (#​1478)
  • housekeeping: npm audit concerns (#​1474)

v3.9.4

Compare Source

Changelog
  • improvement: bypass style/explode processing for Parameter.content values (#​1469)
  • improvement: add newline remover for Header values (#​1468)

v3.9.3

Compare Source

This release includes a fix that prevents resolution of $ref keys in OpenAPI 3.0 Media Type Objects that are within a Request Body Object or Response Object.

Changelog
  • fix: non-standard resolution behavior (via #​1465)

v3.9.2

Compare Source

This release includes housekeeping tasks that should resolve all current npm audit advisories displayed when installing Swagger Client.

Changelog
  • housekeeping: @kyleshockey/js-yaml -> js-yaml (via #​1459)
  • housekeeping: webpack@4 + babel@7 (via #​1455)
  • housekeeping: resolve npm audit items + add security-audit script (via #​1456)

v3.9.1

Compare Source

This release pins our fast-json-patch dependency to ~2.1.0 in order to avoid a runtime error users were encountering in #​1460.

No source changes are included.

v3.9.0

Compare Source

This release includes a new useCircularStructures option that instructs Swagger Client to represent circular references with circular JavaScript objects, as well as fixes in Specmap for documents with nested allOf/$ref values.

Changelog
  • fix: handle allOf/ref/circular structure interactions (via #​1435)
  • security: mitigate CVE-2018-20834 (via #​1434)
  • housekeeping: bump handlebars from 4.0.11 to 4.1.2 (via #​1440)
  • housekeeping: bump lodash from 4.17.10 to 4.17.11 (via #​1439)
  • housekeeping: make changelog generator more flexible (via #​1428)
  • housekeeping: move traverse to production dependencies (via #​1443)
  • housekeeping: remove test:webpackfrom release configuration (via #​1441)
  • housekeeping: use jest to run webpack bundle tests (via #​1438)

v3.8.26

Compare Source

This release was unpublished on npm because it was missing a production dependency, which was fixed in #​1443. Use swagger-client@3.9.0 instead.

v3.8.25

Compare Source

This patch release fixes a bug related to the usage of path parameter templating more than once within a Path Item Object's key.

Changelog
  • fix: support path parameter inclusion when used twice in a path (via #​1424)

v3.8.24

Compare Source

Summary

Small patch release that includes a fix for the resolver improperly processing $ref values inside of Schema Object's items.example.

Changelog
  • fix: block resolution of item-level example (via #​1423)

v3.8.23

Compare Source

Changelog:

  • improvement: use JSON.parse method for all types and encodings of JSON (via #​1419)

v3.8.22

Compare Source

v3.8.21

Compare Source

Interface changes: none.

Changelog:

  • fix: pad with 0 when percent-encoding characters (via #​1386)

v3.8.20

Compare Source

Interface changes: none.

Changelog:

  • fix: drop browser global whitelisting from test harnesses (via #​1383)

v3.8.19

Compare Source

FYI: Swagger Client 3.8.16, 3.8.17, and 3.8.18 can be ignored - they were created in the process of troubleshooting a release script.

Interface changes: none.

Changelog:

  • improvement: make isFile compatible with React Native (via #​1374)
  • bugfix: allow use of 'properties' property name in models (via #​1368)

v3.8.18

Compare Source

v3.8.17

Compare Source

v3.8.16

Compare Source

v3.8.15

Compare Source

Interface changes: none.

Changelog:

  • fix: allow use of 'properties' property name in models (via #​1368)

v3.8.14

Compare Source

v3.8.13

Compare Source

Interface changes: none.

  • bugfix(resolver): drop patches that reference nonexistent paths (via #​1365)

v3.8.12

Compare Source

Interface changes: none.

Changelog:

  • fix: ignore null parameter values (via #​1363)

v3.8.11

Compare Source

Interface changes: none.

Changelog:

Reverts
  • reverted "remove babel-runtime runtime dependency" (via #​1358) (cafb6ae)

v3.8.10

Compare Source

Interface changes: none.

Changelog:

  • improvement: use js-yaml fork (#​1353)
  • fix: decouple resolver from function.prototype.name (via #​1351)
  • fix(resolver): exempt schema example children from $ref resolution (via #​1349)
  • housekeeping: run bundlesize as part of test command (via #​1350)

v3.8.8

Compare Source

This version serves as a stopgap for #​1335 - it should resolve any issue around utilizing the resolver in a minified environment.

v3.8.7

Compare Source

Interface changes: Parameters with allowEmptyValue: true are no longer (incorrectly) automatically included in requests - you must set the parameter value to an empty string, otherwise it will be omitted.

Changelog:

  • improvement: remove babel-runtime dependency (via #​1203)
  • bugfix: enable omission of allowEmptyValue parameters (via #​1333)
  • housekeeping: replace Mocha with Jest in unit tests (via #​1312)
  • housekeeping: use export default syntax for top-level module (via #​1318)

v3.8.6

Compare Source

Fixes a dependency issue reported in #​1326.

v3.8.5

Compare Source

Interface changes: none.

Changelog:

  • feature: OAS3 binary media type support (via #​1324)

v3.8.4

Compare Source

Interface changes: none.

Changelog:

  • feature: OAS3 object parameter serialization support (via #​1321)
  • bugfix: $ref value encoding/decoding (via #​1322)

v3.8.3

Compare Source

Interface changes: none.

Changelog:

  • bugfix: parsing of an empty OAS3 servers array (via #​1310)

v3.8.2

Compare Source

v3.8.1

Compare Source

Interface changes: none.

Changelog:

  • bugfix: $ref + allOf interation in the resolver (via #​1275, #​1309)
  • bugfix: deep $ref resolution issue based on data order in a document (via #​1243)
  • bugfix: relative URL construction based on remote definition URL (via #​1312)
  • dependency: upgrade to deep-extend@^0.5.1 to avoid potential prototype pollution security issue (via #​1304)
  • meta: multiple issue templates, to encourage higher-quality reports (via #​1311)

v3.8.0

Compare Source

This release introduces a new attachContentTypeForEmptyPayload option that attaches Content-Type headers when an operation calls for a body but no value is provided.

There are also some minor changes to requestContentType: it now allows control over Content-Type when no body value is provided.

v3.7.2

Compare Source

Fixes a regression related to parameter normalization that was causing an infinite loop; see swagger-api/swagger-ui#​4466 and swagger-api/swagger-ui#​4467.

v3.7.1

Compare Source

Interface changes: none.

Changelog:

  • bugfix: groups of multiple referenced inherited parameters are now handled correctly by resolveSubtree (via #​1295)

v3.7.0

Compare Source

Interface changes: v2OperationIdCompatibilityMode option is now available. You can use it to generate v2-style names for operations in the tags interface.

Changelog:

  • feature: operationId generator v2 compatibility mode (via #​1283)
  • bugfix: nested allOf + $ref resolution (via #​1282)
  • bugfix: http error handling quality regression (via #​1285)

v3.6.0

Compare Source

Interface changes: you can now return a Promise from a requestInterceptor or responseInterceptor and Swagger-Client will wait for it to resolve.

Changelog:

  • feature: asynchronous interceptors (via #​1261)
  • bugfix: normalization is more durable to n > 1 rounds of subtree resolution (via #​1274)

v3.5.2

Compare Source

Interface changes: none.

Changelog:

  • bugfix: whole-document remote references (e.g. $ref: "./myOtherDoc.json") are no longer erroneously flagged as indirect circular references (via #​1265)

v3.5.1

Compare Source

Interface changes: none.

Changelog:

  • improvement: specmap mergeDeep JSON patches now intelligently take shortcuts if source and destination object properties do not conflict (via #​1217)
  • dependency: moved to fast-json-patch@2, which solves an issue that was blocking React Native users from using the library (via #​1253)

v3.5.0

Compare Source

Interface changes: Added Swagger.resolveSubtree.

Changelog:

  • Added a subtree-discriminating resolver interface to Specmap, for more performant resolution in downstream projects (via #​1248)

v3.4.11

Compare Source

FYI: 3.4.10 was mistakenly built from an older commit during 3.4.9's deploy process, so 3.4.11 was released to supersede them both.

Interface changes: none.

Changelog:

  • bugfix: ignore more freely-named key positions; reducing erroneous $ref and allOf parsing (via #​1195)
  • housekeeping: add more tests to check freely-named key position avoidance (via #​1240)

v3.4.10

Compare Source

v3.4.9

Compare Source

v3.4.8

Compare Source

Interface changes: none.

  • Improvement(specmap): $$ref meta patches are no longer erronously attached to $ref targets (via #​1237)
  • Bugfix(oas3-execute): style: deepObject is now built correctly (via #​1235)
  • Bugfix: http.withCredentials flag is now correctly applied (via #​1236)

v3.4.7

Compare Source

Interface changes: none.

  • Improvement: target JSON, XML, YAML, and text media types more precisely in shouldDownloadAsText logic (via #​1227)
  • Bugfix: HTTP agent withCredentials flag now works as expected (via #​1189)

v3.4.6

Compare Source

Interface changes: none.

  • Improvement: application/yaml is now advertised as an acceptable media type when fetching remote decoments (via #​1232)
  • Bugfix: __originalOperationId is now more performant and accurate (via #​1225)

v3.4.5

Compare Source

Interface changes: none.

  • Bugfix: OAS3 Array request body key values are now comma-seperated instead of being JSON-stringified (via #​1233)
    - As an example: a request body of { a: [1, 2, 3] } was originally serialized to a=[1,2,3], and is now serialized to a=1,2,3.

v3.4.4

Compare Source

Interface changes: none.

  • Improvement: $ref resolver now ignores $ref keys in freely-named key positions within the Swagger/OpenAPI specification (via #​1214)
  • Housekeeping: test suite npm scripts now run correctly in Windows (via #​1208)

v3.4.3

Compare Source

Interface changes: none.

  • Performance: $ref resolver lookaside was reimplemented, which should significantly improve the performance of larger API definitions (via #​1209)

v3.4.2

Compare Source

Interface changes: none.

  • Bugfix: non-ASCII characters are now percent-encoded correctly (via #​1204)
  • Bugfix: Unicode surrogate pairs are now percent-encoded correctly (via #​1205)
  • Bugfix: normalization no longer results in incorrect parameter ambiguity warnings (via #​1180)

Version diff

v3.4.1

Compare Source

Interface changes: none.

  • Bugfix: formatValue now handles OAS3 parameter values correctly (via #​1200)
  • Bugfix: resolver is now more reliably handling $refs, by way of a new caching system (via #​1201)

Version diff

v3.4.0

Compare Source

Interface changes: none.

  • Feature: added support for OAS3 path and operation-level servers (via #​1192)
  • Bugfix: rewired OAS3 parameter style/explode/allowReserved subsystem: generated requests that use those options should be more accurate now (via #​1193)
  • Performance: added specmap $ref plugin lookaside (via #​1190)

Version Diff

v3.3.5

Compare Source

Interface changes: none.

  • Bugfix: object values in application/x-www-form-urlencoded request bodies are now stringified and escaped correctly

Version Diff

v3.3.4

Compare Source

Interface changes: none.

  • Improvement: modified JSON.parse/JsYaml.safeLoad switching logic, it's now easier to slim down Swagger-Client if you don't need YAML parsing (via #​1183)

Version Diff

v3.3.3

Compare Source

Interface changes: none.

  • Improvement: rewired JSON/YAML parsing logic, to allow for skinnier implementations for users that only need JSON (via #​1175)
  • Bugfix: covered RFC3986 requirements correctly in query parameter allowReserved processing (via #​3817)

Version Diff

v3.3.2

Compare Source

Interface changes: none.

  • Improvement: relaxed Lodash version constraints to aid dependency flattening for users (via #​1169)
  • Bugfix: added support for React Native by switching from isomorphic-fetch to cross-fetch (via #​1158)
  • Bugfix: added safe access for operationId that threw errors for empty operations - which can be encountered while editing a definition (via #​1157)
  • Housekeeping: improved CI process to speed up builds (via #​1170)
  • Housekeeping: added a build-dev script that creates non-minified dist files (via #​1172)

Version Diff

v3.3.1

Compare Source

Interface changes: none.

  • Bugfix: base URLs are now correctly computed when we have no way to build an absolute URL (via #​1166)

Version Diff

v3.3.0

Compare Source

Interface changes: none.

  • Feature: many OpenAPI 3.0 authentication schemes are now supported (see #​1159 for more details)
  • Bugfix: OAuth2 bearer token types are no longer case-sensitive, and will always result in a Bearer prefix in the Authorization header (via #​1156)
  • Bugfix: OpenAPI 3.0 documents without servers defined no longer cause TypeEerrors when trying to execute (via #​1160)
  • Bugfix: requestInterceptor and responseInterceptor options now intercept definition and $ref download requests (via #​1161)
  • Housekeeping: loosened our grip on fetch-mock's version, since they patched a release that broke our tests (via #​1162)

Version Diff

v3.2.2

Compare Source

Interface changes: none.

  • Bugfix: tightened our fetch-mock devDependency version constraints, to fix a problem with a new version that was breaking our builds (via #​1148)
  • Bugfix: fixed usage of ES6 string method startsWith that was causing IE11 problems (via #​1153)

Version Diff

v3.2.1

Compare Source

This release contains no source changes; it constrains fast-json-patch's version in order to avoid noisy warnings present in their latest versions.

v3.2.0

Compare Source

Interface changes: none.

  • Improvement: parameter style and explode is now supported within OpenAPI 3.0 definitions (via #​1140)
  • Bugfix: contextUrls are now properly considered for OpenAPI 3.0 requests (via #​1141)

Version Diff

v3.1.2

Compare Source

Interface changes:

  • Parameters can now be referred to by ${in}.${name} as well as by name.
  • Values for named parameters will now be applied to all parameters with that name.

  • Improvement: parameters within the same operation that share a name can now be disambiguated (via #​1115)

Version Diff

v3.1.1

Compare Source

Interface changes: None

  • Bugfix: improved allOf handling, so original values are preserved (via #​1130, fixes many related UI bugs)
  • Bugfix: empty access_token values no longer create an empty Authorization value (via #​1131)

v3.1.0

Compare Source

Interface changes: None

  • Feature: added basic support for OAS 3.0 API definitions (via #​1127)
  • Meta: updated npm scripts to be cross-platform (via #​1126)

v3.0.20

Compare Source

Interface changes: None.

  • Feature: added userFetch option (via #​1098)

Version Diff

v3.0.19

Compare Source

Interface changes: None.

Version Diff

v3.0.18

Compare Source

Interface changes: None.

  • Bugfix: added support for merging arrays in allOf constructs (via #​1101)
  • Bugfix: added support for constructing query strings with 0 values (via #​1105)
  • Chore: Enabled linter check during CI PR testing (via #​1104)

v3.0.17

Compare Source

v3.0.16

Compare Source

Interface changes: None.

  • IE11 compatibility: removed references to Array.prototype.find (via #​1088)
  • Bugfix: Query parameters with Boolean value false were not being properly serialized in buildRequest (via #​1093)

Version Diff

v3.0.15

Compare Source

Interface changes: None.

  • README updates and improvements
  • Configured the default resolver fetch implementation to send cookies and Authorization headers for same-origin requests (see #​1083)
  • Developer note: removed package-lock.json from the repository, as it was causing problems.

Version Diff

v3.0.14

Compare Source

Interface changes: None.

  • Fixed a defect in __originalOperationId logic (swagger-api/swagger-ui#​3203) and added more tests around the functionality
  • Added throw when execute can't find a requested operation

Version Diff

v3.0.13

Compare Source

v3.0.12

Compare Source

Interface changes: New resolve options, see below.

  • Improvement: parameterMacro and modelPropertyMacro options in resolve (via #​1067)

Version diff

v3.0.11

Compare Source

v3.0.10

Compare Source

Interface changes: Client interface method names may differ if you have duplicate operationIds in your spec. Note that this is not a breaking change, as duplicate operationIds were previously undefined behavior.

  • Improvement: generated operationIds are now friendlier (get_one instead of get-/one), and duplicate explicit operationIds are now handled more reliably (#​1003 via #​1048)
  • Bugfix: ensure we don't stringify formData + fix multipart upload (via #​1051)

Version Diff

v3.0.9

Compare Source

Interface changes: no longer need to manually stringify request bodies for execute.

  • Improvement: request bodies are now automatically stringified if they are JavaScript objects (#​1006 via #​1034)
  • Bugfix: send Authorization: Bearer ... in OAuth2, for RFC 6750 compliance (#​1040 via #​1041)
  • Bugfix: include response property on Errors (via #​1039)

Version Diff

v3.0.8

Compare Source

Interface changes: Potentially breaking change for corner cases to internal fetch. We elected to break semver for this release - see discussion in #​1015.

  • Bugfix: circular reference issues when baseDoc is present (via #​1031)

Version Diff

v3.0.7

Compare Source

v3.0.6

Compare Source

v3.0.5

Compare Source

v3.0.4

Compare Source

v3.0.3

Compare Source

Interface changes: No runtime interface changes, but the bundle file is now exported as a UMD module.

  • Added loadSpec option to fetch that allows optimistic loading of a resource as text, regardless of response Content-Type
  • Added authorizations to instance execute
  • Fixed an issue where path and operation parameters weren't being merged (#​965)
  • Added contextUrl option that allows user to specify the URL that a spec is in the context of

Version Diff

v3.0.2

Compare Source

Interface changes: None

  • the Access-Control-Allow-Origin: * header is no longer attached to all requests

Version Diff

v3.0.1

Compare Source

All new! The swagger-js project has been completely rewritten to clean up the code base as well as prepare for the upcoming OpenAPI Specification 3.0 (OAS 3.0).
Please note that the library does not currently support OAS 3.0 as it is still in draft form.
Expect an update to this library as we approach the release.

We have worked hard to improve the library without breaking too many plates along the way.
With progress comes change, though, and there are a number of changes that you need to carefully consider before upgrading to this version.
Depending on your programming techniques, the upgrade could have zero impact on your usage of the library.

Breaking changes

In releasing the 3.x series of swagger-js tooling, we have made extensive changes to how to interact with the library.
If you cannot support these changes, please remain on the 2.x series!
The changes are listed below.

  • You now must use node 6.x to build the swagger-js project. This is due to the standardization on ES6 syntax, among other things.
    Note, newer versions may work fine, but the project is built and tested with 6.x.

  • Minimum browser support: es5 compatible. IE11+ ( can probably make it run in IE10 )

  • Minimum runtime node version: 4.x

  • The constructor is similar, but there are some key differences.

    • The return value is a promise. Not the client, the client is exposed as the only argument in the resolved promise.
    • When the promise resolves, the specification has been downloaded and the api is ready to use.
    • ie: var promise = Swagger({...}).then(client => { ...} )
  • Swagger Specification 1.0, 1.1, 1.2 are no longer supported. Please remain on the 2.x series if you need to use older specification versions.

  • Promise-only support. The older callback/error function signatures have been dropped to allow for a modern and consistent promise pattern.

    • We've also dropped the q libraray in favour of the more standard approach of using native promises and a pollyfill where needed.
  • Dropped all rendering logic. During the evolution of swagger-js, there was some rendering logic in the project for legacy support. Well that's gone now, and there is a clear separation of concerns between parsing & execution (swagger-js) and rendering (swagger-ui + others).

  • Dropped asCurl from library. This was considered to be part of rendering logic and removed with the reasoning above.

Major changes

  • Instantiation of swagger-js supports the 2.x series, with the exception that usePromise is implicitly (and always) true.

  • New instantiation structure example: Swagger({ ... }).then( client => { ... }), where client has all the goodies.

  • Static functions, can do everything the methods can.

  • Code structure. There is now a clear separation between execution, resolution, and public interfaces.

  • Test structure, using http mocks instead of real nodejs servers. Much faster.

  • New build system, webpack + babel

More details...

Can be seen in Migration from 2.x.

Known limitations

There are some items which are limitations with the current release but are planned to be included to the library. Want them faster? Consider upvoting issues and being patient. Or even better, jump in and contribute!

  • Several internals to swagger-js 2.x ( see the the Graveyard.

  • Macro support
    Global defaults for executing operations. Beyond the defaults described by the specification. Completely dropped

  • Authentication. Limited support exists for try-it-out requests, none for the fetching of the OAS specs. This is a high priority and is being tracked in issues.


Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments