package-lock.json was regenerated using Node@16.13.2
and npm@8.1.2. Along with that, these Node.js and npm
versions were set to .nvmrc file.
Given that the dependency tree now changed,
webpack config resolve aliases needed to be
amended to reflect the current dependency tree.
- New top-level field - `webhooks`. This allows describing out-of-band webhooks that are available as part of the API.
- New top-level field - `jsonSchemaDialect`. This allows defining of a default `$schema` value for Schema Objects
- The Info Object has a new `summary` field.
- The License Object now has a new `identifier` field for SPDX licenses. This `identifier` field is mutually exclusive with the `url` field. Either can be used in OpenAPI 3.1 definitions.
- Components Object now has a new entry `pathItems`, to allow for reusable Path Item Objects to be defined within a valid OpenAPI document.
- `License` and `Contact` components are now exported and available via `getComponent`
- New version predicates and selectors for `isOpenAPI30` and `isOpenAPI31`. This avoids needing to change the usage of `isOAS3` selector.
- New OAS3 components: `Webhooks`
- New OAS3 wrapped components: `Info`, `License`
SwaggerUI is now built using `webpack@5`, with dev support for `webpack-dev-server@4`
- ES Module output bundle path now points to `swagger-ui-es-bundle-core`, which does not include dependencies
- No change to CommonJS output bundle or path
- Now uses Asset Modules, which replaces `file-loader`, `raw-loader`, and `url-loader`
- Removed unused rules/loaders for `.woff | .woff2 | .ttf | .eot` fonts and html
- Node polyfills are no longer bundled with `webpack@5`, and must be loaded separately and/or use `resolve.fallback`.
As an example, SwaggerUI loads `process`, `buffer`, and `stream-browserify` as `devDependencies` in order to build development and production bundles.
SwaggerUI-React
- Now imports `swagger-ui-es-bundle-core`, and similarly outputs `swagger-ui-es-bundle-core` to its `dist` directory
Dev notes:
- Order of execution matters for the production npm build scripts. `build-stylesheets` needs to get built first,
then cleanup of any empty artifacts, before building the various production bundles
- `Dev-helpers` now relies on `HTMLWebpackPlugin` to inject css and bundle files
* es2015 bundle with dependencies via npm script build:es:bundle
* es2015 bundle without dependencies via npm script build:es:bundle
* jest dependency for test:artifact
* migrate babel.config.json to babel.config.js and maintain env support for commonjs and es2015
* remove polyfill
* fix es syntax: replace module.exports with export
* fix es syntax: remove .jsx extension inside import
* add duplicate code detection check for general purpose use
* webpack alias for lodash
* redux and react-redux dependency bump that removes lodash dependencies
* lodash version match with swagger-client and recent security update
* additional webpack config to help reduce build sizes
* restore max bundle size back to 1024000
As versions of libraries that are both used by swagger-js and swagger-ui
may diverge in time, we must use webpack resolve aliases to make sure
that only one version of these libraries gets bundled.