Skip to content

Commit

Permalink
Updated links with new website domain
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Sep 3, 2019
1 parent 65afb65 commit d4bc7cb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ESLint config
# http://eslint.org/docs/user-guide/configuring
# https://github.com/JS-DevTools/eslint-config-modular
# https://jstools.dev/eslint-config-modular/

root: true

Expand Down
16 changes: 8 additions & 8 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,29 @@ SwaggerParser.validate("my-api.yaml", {
-------------------
The `parse` options determine how different types of files will be parsed.

Swagger Parser comes with built-in JSON, YAML, plain-text, and binary parsers, any of which you can configure or disable. You can also add [your own custom parsers](plugins/parsers.md) if you want.
Swagger Parser comes with built-in JSON, YAML, plain-text, and binary parsers, any of which you can configure or disable. You can also add [your own custom parsers](https://apitools.dev/json-schema-ref-parser/docs/plugins/parsers.html) if you want.

|Option(s) |Type |Description
|:----------------------------|:----------|:------------
|`json`<br>`yaml`<br>`text`<br>`binary`|`object` `boolean`|These are the built-in parsers. In addition, you can add [your own custom parsers](plugins/parsers.md)<br><br>To disable a parser, just set it to `false`.
|`json.order` `yaml.order` `text.order` `binary.order`|`number`|Parsers run in a specific order, relative to other parsers. For example, a parser with `order: 5` will run _before_ a parser with `order: 10`. If a parser is unable to successfully parse a file, then the next parser is tried, until one succeeds or they all fail.<br><br>You can change the order in which parsers run, which is useful if you know that most of your referenced files will be a certain type, or if you add [your own custom parser](plugins/parsers.md) that you want to run _first_.
|`json`<br>`yaml`<br>`text`<br>`binary`|`object` `boolean`|These are the built-in parsers. In addition, you can add [your own custom parsers](https://apitools.dev/json-schema-ref-parser/docs/plugins/parsers.html)<br><br>To disable a parser, just set it to `false`.
|`json.order` `yaml.order` `text.order` `binary.order`|`number`|Parsers run in a specific order, relative to other parsers. For example, a parser with `order: 5` will run _before_ a parser with `order: 10`. If a parser is unable to successfully parse a file, then the next parser is tried, until one succeeds or they all fail.<br><br>You can change the order in which parsers run, which is useful if you know that most of your referenced files will be a certain type, or if you add [your own custom parser](https://apitools.dev/json-schema-ref-parser/docs/plugins/parsers.html) that you want to run _first_.
|`json.allowEmpty` `yaml.allowEmpty` `text.allowEmpty` `binary.allowEmpty`|`boolean`|All of the built-in parsers allow empty files by default. The JSON and YAML parsers will parse empty files as `undefined`. The text parser will parse empty files as an empty string. The binary parser will parse empty files as an empty byte array.<br><br>You can set `allowEmpty: false` on any parser, which will cause an error to be thrown if a file empty.
|`json.canParse` `yaml.canParse` `text.canParse` `binary.canParse`|`boolean`, `RegExp`, `string`, `array`, `function`|Determines which parsers will be used for which files.<br><br>A regular expression can be used to match files by their full path. A string (or array of strings) can be used to match files by their file extension. Or a function can be used to perform more complex matching logic. See the [custom parser](plugins/parsers.md) docs for details.
|`json.canParse` `yaml.canParse` `text.canParse` `binary.canParse`|`boolean`, `RegExp`, `string`, `array`, `function`|Determines which parsers will be used for which files.<br><br>A regular expression can be used to match files by their full path. A string (or array of strings) can be used to match files by their file extension. Or a function can be used to perform more complex matching logic. See the [custom parser](https://apitools.dev/json-schema-ref-parser/docs/plugins/parsers.html) docs for details.
|`text.encoding`|`string` |The encoding to use when parsing text-based files. The default is "utf8".


`resolve` Options
-------------------
The `resolve` options control how Swagger Parser will resolve file paths and URLs, and how those files will be read/downloaded.

Swagger Parser comes with built-in support for HTTP and HTTPS, as well as support for local files (when running in Node.js). You can configure or disable either of these built-in resolvers. You can also add [your own custom resolvers](plugins/resolvers.md) if you want.
Swagger Parser comes with built-in support for HTTP and HTTPS, as well as support for local files (when running in Node.js). You can configure or disable either of these built-in resolvers. You can also add [your own custom resolvers](https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html) if you want.

|Option(s) |Type |Description
|:----------------------------|:----------|:------------
|`external`|`boolean`|Determines whether external $ref pointers will be resolved. If this option is disabled, then external $ref pointers will simply be ignored.
|`file`<br>`http`|`object` `boolean`|These are the built-in resolvers. In addition, you can add [your own custom resolvers](plugins/resolvers.md)<br><br>To disable a resolver, just set it to `false`.
|`file.order` `http.order`|`number`|Resolvers run in a specific order, relative to other resolvers. For example, a resolver with `order: 5` will run _before_ a resolver with `order: 10`. If a resolver is unable to successfully resolve a path, then the next resolver is tried, until one succeeds or they all fail.<br><br>You can change the order in which resolvers run, which is useful if you know that most of your file references will be a certain type, or if you add [your own custom resolver](plugins/resolvers.md) that you want to run _first_.
|`file.canRead` `http.canRead`|`boolean`, `RegExp`, `string`, `array`, `function`|Determines which resolvers will be used for which files.<br><br>A regular expression can be used to match files by their full path. A string (or array of strings) can be used to match files by their file extension. Or a function can be used to perform more complex matching logic. See the [custom resolver](plugins/resolvers.md) docs for details.
|`file`<br>`http`|`object` `boolean`|These are the built-in resolvers. In addition, you can add [your own custom resolvers](https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html)<br><br>To disable a resolver, just set it to `false`.
|`file.order` `http.order`|`number`|Resolvers run in a specific order, relative to other resolvers. For example, a resolver with `order: 5` will run _before_ a resolver with `order: 10`. If a resolver is unable to successfully resolve a path, then the next resolver is tried, until one succeeds or they all fail.<br><br>You can change the order in which resolvers run, which is useful if you know that most of your file references will be a certain type, or if you add [your own custom resolver](https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html) that you want to run _first_.
|`file.canRead` `http.canRead`|`boolean`, `RegExp`, `string`, `array`, `function`|Determines which resolvers will be used for which files.<br><br>A regular expression can be used to match files by their full path. A string (or array of strings) can be used to match files by their file extension. Or a function can be used to perform more complex matching logic. See the [custom resolver](https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html) docs for details.
|`http.headers`|`object`|You can specify any HTTP headers that should be sent when downloading files. For example, some servers may require you to set the `Accept` or `Referrer` header.
|`http.timeout` |`number` |The amount of time (in milliseconds) to wait for a response from the server when downloading files. The default is 5 seconds.
|`http.redirects` |`number` |The maximum number of HTTP redirects to follow per file. The default is 5. To disable automatic following of redirects, set this to zero.
Expand Down
4 changes: 2 additions & 2 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ declare namespace SwaggerParser {
/**
* JSON Schema `$Ref` Parser comes with built-in resolvers for HTTP and HTTPS URLs, as well as local filesystem paths (when running in Node.js). You can add your own custom resolvers to support additional protocols, or even replace any of the built-in resolvers with your own custom implementation.
*
* See https://github.com/APIDevTools/swagger-parser/blob/master/docs/plugins/resolvers.md
* See https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html
*/
export interface ResolverOptions {

Expand Down Expand Up @@ -355,7 +355,7 @@ declare namespace SwaggerParser {
*
* The file info object currently only consists of a few properties, but it may grow in the future if plug-ins end up needing more information.
*
* See https://github.com/APIDevTools/swagger-parser/blob/master/docs/plugins/file-info-object.md
* See https://apitools.dev/json-schema-ref-parser/docs/plugins/file-info-object.html
*/
export interface FileInfo {

Expand Down
2 changes: 1 addition & 1 deletion online/src/js/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ESLint config
# http://eslint.org/docs/user-guide/configuring
# https://github.com/JS-DevTools/eslint-config-modular
# https://jstools.dev/eslint-config-modular/

extends:
- modular/node
Expand Down
2 changes: 1 addition & 1 deletion test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ESLint config
# http://eslint.org/docs/user-guide/configuring
# https://github.com/JS-DevTools/eslint-config-modular
# https://jstools.dev/eslint-config-modular/

extends:
- modular/test

0 comments on commit d4bc7cb

Please sign in to comment.