diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c7fbff..b8e2d112 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ + +# 1.11.0 (2017-03-09) + + +### Bug Fixes + +* do not hang when swagger doesn't contain any paths ([e4f5388](https://github.com/Rebilly/ReDoc/commit/e4f5388)), closes [#216](https://github.com/Rebilly/ReDoc/issues/216) +[#201](https://github.com/Rebilly/ReDoc/issues/201) +* optimize and support inherited discriminator ([64e5741](https://github.com/Rebilly/ReDoc/commit/64e5741)) +* redoc hangs when indexing recursive discriminator-based definitions ([1e96f88](https://github.com/Rebilly/ReDoc/commit/1e96f88)) +* wrong warnings for $ref not single ([193f4bf](https://github.com/Rebilly/ReDoc/commit/193f4bf)), closes [#221](https://github.com/Rebilly/ReDoc/issues/221) +* x-extendedDiscriminator not working ([4899f3e](https://github.com/Rebilly/ReDoc/commit/4899f3e)), closes [#217](https://github.com/Rebilly/ReDoc/issues/217) + + +### Features + +* copy pretty-printed JSON ([e99d66d](https://github.com/Rebilly/ReDoc/commit/e99d66d)), closes [#219](https://github.com/Rebilly/ReDoc/issues/219) +* support for OpenAPI object as a parameter for `init` ([d99f256](https://github.com/Rebilly/ReDoc/commit/d99f256)), closes [#224](https://github.com/Rebilly/ReDoc/issues/224) + + +## 1.10.2 (2017-03-01) + +### Bug Fixes +* clear page fragment when scroll to the beginning +* update docs for x-tagGroup, add warning [#215](https://github.com/Rebilly/ReDoc/issues/215) +* show warning for non-used in tagGroup tags + ## 1.10.1 (2017-02-27) diff --git a/README.md b/README.md index aefd18c5..bb44a39f 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ ReDoc makes use of the following [vendor extensions](http://swagger.io/specifica * [`x-logo`](docs/redoc-vendor-extensions.md#x-logo) - is used to specify API logo * [`x-traitTag`](docs/redoc-vendor-extensions.md#x-traitTag) - useful for handling out common things like Pagination, Rate-Limits, etc * [`x-code-samples`](docs/redoc-vendor-extensions.md#x-code-samples) - specify operation code samples +* [`x-examples`](docs/redoc-vendor-extensions.md#x-examples) - specify JSON example for requests * [`x-nullable`](docs/redoc-vendor-extensions.md#nullable) - mark schema param as a nullable * [`x-displayName`](docs/redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories * [`x-tagGroups`](docs/redoc-vendor-extensions.md#x-tagGroups) - group tags by categories in the side menu diff --git a/build/webpack.common.js b/build/webpack.common.js index 5ff99d08..30e9a57d 100644 --- a/build/webpack.common.js +++ b/build/webpack.common.js @@ -3,7 +3,6 @@ const webpack = require('webpack'); const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin; const StringReplacePlugin = require("string-replace-webpack-plugin"); const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin'); -const ngcWebpack = require('ngc-webpack'); const VERSION = JSON.stringify(require('../package.json').version); @@ -123,15 +122,15 @@ module.exports = function (options) { } }; - if (options.AOT) { - conf.plugins.push( - new ngcWebpack.NgcWebpackPlugin({ - disable: !options.AOT, - tsConfig: root('tsconfig.webpack.json'), - resourceOverride: root('build/resource-override.js') - }) - ); - } + // if (options.AOT) { + // conf.plugins.push( + // new ngcWebpack.NgcWebpackPlugin({ + // disable: !options.AOT, + // tsConfig: root('tsconfig.webpack.json'), + // resourceOverride: root('build/resource-override.js') + // }) + // ); + // } return conf; } diff --git a/build/webpack.test.js b/build/webpack.test.js index e1296d74..551b1b4c 100644 --- a/build/webpack.test.js +++ b/build/webpack.test.js @@ -1,6 +1,7 @@ const webpack = require('webpack'); const root = require('./helpers').root; +const path = require('path'); const webpackMerge = require('webpack-merge'); // used to merge webpack configs const commonConfig = require('./webpack.common.js'); @@ -57,6 +58,10 @@ module.exports = webpackMerge(commonConfig({ /\.tmp[\\\/].*$/, /dist[\\\/].*$/, /(?:[^\\\/]*(?:[\\\/]|$))*[^\\\/]*\.css$/ // ignore css files - ]) + ]), + new webpack.ContextReplacementPlugin( + /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, + path.resolve(__dirname, '../src') + ) ], }) diff --git a/manual-types/index.d.ts b/custom.d.ts similarity index 65% rename from manual-types/index.d.ts rename to custom.d.ts index ba8e22db..35963020 100644 --- a/manual-types/index.d.ts +++ b/custom.d.ts @@ -1,13 +1,3 @@ -declare module "dropkickjs" -declare module "json-schema-ref-parser" -declare module "openapi-sampler" -declare module "remarkable" -declare module "scrollparent" -declare module "slugify" -declare module "url" -declare module "json-pointer"; -declare module "mark.js"; - declare module "*.css" { const content: string; export default content; diff --git a/docs/redoc-vendor-extensions.md b/docs/redoc-vendor-extensions.md index 2e6329cc..b285aafb 100644 --- a/docs/redoc-vendor-extensions.md +++ b/docs/redoc-vendor-extensions.md @@ -169,6 +169,17 @@ lang: JavaScript source: console.log('Hello World'); ``` +### Parameter Object vendor extensions +Extends OpenAPI [Parameter Object](http://swagger.io/specification/#parameterObject) +#### x-examples +| Field Name | Type | Description | +| :------------- | :------: | :---------- | +| x-examples | [Example Object](http://swagger.io/specification/#exampleObject) | Object that contains examples for the request. Applies when `in` is `body` and mime-type is `application/json` | + +###### Usage in ReDoc +`x-examples` are rendered in the JSON tab on the right panel of ReDoc. + + ### Schema Object vendor extensions Extends OpenAPI [Schema Object](http://swagger.io/specification/#schemaObject) #### x-nullable diff --git a/lib/app.module.ts b/lib/app.module.ts index 37ee2c5a..5892f23c 100644 --- a/lib/app.module.ts +++ b/lib/app.module.ts @@ -1,11 +1,12 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RedocModule } from './redoc.module'; import { Redoc } from './components/index'; @NgModule({ - imports: [ BrowserModule, RedocModule ], + imports: [ BrowserModule, BrowserAnimationsModule, RedocModule ], bootstrap: [ Redoc ], exports: [ Redoc ] }) diff --git a/lib/components/JsonSchema/json-schema.html b/lib/components/JsonSchema/json-schema.html index c60b7a28..8ab87420 100644 --- a/lib/components/JsonSchema/json-schema.html +++ b/lib/components/JsonSchema/json-schema.html @@ -1,5 +1,5 @@ - - - - -