mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
Docs release (#35)
* docs: updated docs for release, added license * docs: remove outdated test files
This commit is contained in:
7
LICENSE.md
Normal file
7
LICENSE.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright 2019 Redoc.ly LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
258
README.md
258
README.md
@@ -1,82 +1,220 @@
|
||||
# REVALID. Custom OpenAPI validator
|
||||
# @redocly/openapi-cli. Open API 3 cli toolset
|
||||
|
||||
## Approach
|
||||
Unline other OpenAPI validators Revalid defines the possible type tree of a valid OpenAPI document and then traverses input validating it. This approach is very similar to how compilers work and gives major performance benefits over other approaches. Also, it allows to easily add custom or quite complex rules.
|
||||
Unlike other OpenAPI validators @redocly/openapi-cli defines the possible type tree of a valid OpenAPI definition and then traverses it. This approach is very similar to how compilers work and gives major performance benefits over other approaches. Also, it allows to easily add custom or quite complex visitors. For now, they include validation rules and a bundler.
|
||||
|
||||
## Features
|
||||
|
||||

|
||||

|
||||
|
||||
As for now, Revalid supports such features:
|
||||
As for now, @redocly/openapi-cli supports such features:
|
||||
|
||||
- [x] Multifile validation. No need to bundle your file before using validator.
|
||||
- [x] Configurable message levels for each rule. You can tailor your experience with Revalid as you wish.
|
||||
- [x] Configurable message levels for each rule. You can tailor your experience with @redocly/openapi-cli as you wish.
|
||||
- [x] Lightning fast validation. Check 1 Mb file less than in one second.
|
||||
- [x] Human readable error messages. Now with stacktrace and codeframes.
|
||||
- [x] Intuitive suggestions for misspelled type names or references.
|
||||
- [x] Easy to implement custom rules. Need something? Ask us or do it yourself.
|
||||
|
||||
All of them are also provided inside our [VS Code extension](https://redoc.ly).
|
||||
## Usage
|
||||
|
||||
### Configuration
|
||||
You can run the `@redocly/openapi-cli` either with `npx` or after installing it locally.
|
||||
|
||||
You can enable/disable separate rules as well as set their priority level using the `revalid.config.json` file which should be in the directory from which you run Revalid.
|
||||
If using `npx`, you can just enter the following:
|
||||
|
||||
Example of the configuration file is quite self-explanatory:
|
||||
`npx @redocly/openapi-cli <command> [options]`.
|
||||
|
||||
```json
|
||||
{
|
||||
"enableCodeframe": true,
|
||||
"rules": {
|
||||
"no-extra-fields": "off",
|
||||
"license": {
|
||||
"url": "on"
|
||||
},
|
||||
"license-required": {
|
||||
"level": "warning"
|
||||
},
|
||||
"unique-parameter-names": {
|
||||
"level": "error",
|
||||
},
|
||||
"no-unused-schemas": "off"
|
||||
}
|
||||
}
|
||||
Otherwise, you can install the `@redocly/openapi-cli` with `npm i -g @redocly/openapi-cli` or `yarn global add @redocly/openapi-cli`. After that, try to run `openapi -h` and if installation was successful, you'll see the usage information.
|
||||
|
||||
Currently, `@redocly/openapi-cli` supports only one command: `validate [options] <filePath>`. Given this command, it will load the given ruleset and traverse the definition via the `filePath` parameter.
|
||||
|
||||
Also, it accepts `[options]` which can be:
|
||||
- `-s, --short` Reduce output to required minimun
|
||||
- `-f, --no-frame` Print no codeframes with errors.
|
||||
- `--config <path>` Specify custom yaml or json config
|
||||
|
||||
In the section below, you can check about how one can provide settings for the `@redocly/openapi-cli`.
|
||||
## Configuration
|
||||
|
||||
All of the following rules are configurable in terms of disabling or changing their severity. In order to update given rule, you should modify (or create) the `.openapi.yml` file in the directory from which you are going to run the validator.
|
||||
|
||||
Also, you can provide path to configuration file name other than `.openapi.yml` by using `--config` option when running the @redocly/openapi-cli.
|
||||
|
||||
If you are creating it from scratch, you might also want to enable/disable codeframe for the full output.
|
||||
|
||||
Below is the config, which is used by default:
|
||||
|
||||
```yaml
|
||||
enableCodeframe: true
|
||||
enbaleCustomRuleset: true
|
||||
rules:
|
||||
bundler: off
|
||||
debug-info: off
|
||||
|
||||
oas3-schema: on
|
||||
path-param-exists: on
|
||||
operation-2xx-response: on
|
||||
unique-parameter-names: on
|
||||
no-unused-schemas: on
|
||||
operation-operationId-unique: on
|
||||
path-declarations-must-exist: on
|
||||
|
||||
api-servers: off
|
||||
license-url: off
|
||||
no-extra-fields: off
|
||||
operation-description: off
|
||||
operation-operationId: off
|
||||
operation-tags: off
|
||||
provide-contact: off
|
||||
servers-no-trailing-slash: off
|
||||
```
|
||||
|
||||
More detailed guide about configuring the validator can be found [here](RULES.md).
|
||||
Here is an example of a modified use `.openapi.yml` file:
|
||||
|
||||
## Contributing
|
||||
|
||||
### Custom validation rules
|
||||
|
||||
To create a custom validation rule you should only define a class which extends `AbstractVisitor`. Inside this class, you can define methods for each type of the OpenAPI Nodes, which returns two methods: `onEnter` and `onExit`. Also, you can use `any()` descriptor to call the rule for all the nodes in your document. These methods will receive four arguments:
|
||||
- node
|
||||
- type object
|
||||
- context
|
||||
- unresolved node (i.e. before $ref in the root of the node was jumped to)
|
||||
|
||||
The rule **must not** mutate any of these object as they are not immutable due to performance reasons.
|
||||
|
||||
So, the simplest rule example is following:
|
||||
|
||||
```js
|
||||
import createError from '../error'; // later it will be a separete package: @revalid/rules
|
||||
|
||||
class ExampleRule extends AbstractVisitor {
|
||||
static get ruleName() {
|
||||
return 'exampleRule';
|
||||
}
|
||||
|
||||
any() {
|
||||
return {
|
||||
onEnter: (node, definition, ctx, unresolvedNode) => {
|
||||
if (node.name && node.name === 'badName') return createError('"badName" is invalid value for "name" field', node, ctx, { fromRule: this.rule, target: 'value', severity: this.config.level});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ExampleRule;
|
||||
```yaml
|
||||
enableCodeframe: true,
|
||||
rules:
|
||||
no-extra-fields: off,
|
||||
external-docs:
|
||||
url: off
|
||||
license-required:
|
||||
level: warning
|
||||
unique-parameter-names:
|
||||
level: warning
|
||||
no-unused-schemas: off
|
||||
```
|
||||
|
||||
Then, put the rule into your local copy of `extendedRules` directory or provide path to the directory with your rule set via `--custom-ruleset <path>` command line argument.
|
||||
## Ruleset overview
|
||||
|
||||
Below you can find a list of the all currently supported rules. To change your settings for given rule, just add or modify corresponding item in the `rules` section of the `.openapi.yml` in your working directory.
|
||||
|
||||
### api-servers
|
||||
OpenAPI servers must be present and be a non-empty array.
|
||||
|
||||
### path-param-exists
|
||||
Each path parameter in the `parameters` section must be present in the path string.
|
||||
|
||||
### license-url
|
||||
License, if provided within `info` section must provide `url` field.
|
||||
|
||||
### no-unused-schemas
|
||||
It might be a bad sign if some of the schemas from the `components` section are not used anywhere. This checks for such scenarios.
|
||||
|
||||
### operation-2xx-response
|
||||
When designing an API it's usually expected to do something succesfully, although it might fail. So, this rule validates, that there is at least one response in the operation with a 2xx status code.
|
||||
|
||||
### operation-description
|
||||
This rule enforces to provide `description` field in `operation`s as within large definition it becomes really easy to lose track of things.
|
||||
|
||||
### operation-operationId
|
||||
Enforce presence of the `operationId` field in each `operation`.
|
||||
|
||||
### operation-operationId-unique
|
||||
`operationId`s are expected to be unique to really identify operations. This rule checks this principle.
|
||||
|
||||
### operation-tags
|
||||
The `tags` field must be present and be a non-empty array in each `operation`.
|
||||
|
||||
### path-declarations-must-exist
|
||||
Within the `operation` path definition you can define path parametrs. If you do so, each declaration of the parameter name within path must be a non-null string. For example, `/api/user/{userId}/profie` is a valid definition with `userId` parameter, but `/api/user/{}/profile` is not.
|
||||
|
||||
### path-keys-no-trailing-slash
|
||||
Generally, it is considered less confusing if you do not have trailing slashes in your paths. Also, it depends on tooling are `example.com/api/users` and `example.com/api/users/` are treated in the same way, so we suggest you to be consistent on this page.
|
||||
|
||||
### provide-contact
|
||||
Info object must contain `contact` field.
|
||||
|
||||
Most of the APIs are not perfect, so there is something useful for your users to know, who can help in case of problems.
|
||||
|
||||
### servers-no-trailing-slash
|
||||
Server URL must not have a trailing slash.
|
||||
|
||||
It depends on tooling are `example.com` and `example.com/` are treated in the same way. In the worst case, the latter option when conjuncted with operations paths migth result into `example.com//api/users`.
|
||||
|
||||
### unique-parameter-names
|
||||
Parameters in `operation` objects must be `unique` definition wide.
|
||||
|
||||
### oas3-schema
|
||||
This rule enforces the structural validation of the OpenAPI definitions according to the OpenAPI Specification 3.0.2. It can be fine-tuned to disable or change message level for each specific type of the OpenAPI Objects. For example, if you have custom structure of the `servers` object, what you can do to prevent error messages regarding it is to update your `.redocly.yml` to the following pattern:
|
||||
|
||||
```yaml
|
||||
... your configuration
|
||||
rules:
|
||||
...other rules,
|
||||
oas3-schema:
|
||||
servers:
|
||||
level: warning
|
||||
```
|
||||
or even totally disable:
|
||||
```yaml
|
||||
... your configuration
|
||||
rules:
|
||||
...other rules,
|
||||
oas3-schema:
|
||||
servers: off
|
||||
```
|
||||
|
||||
Below, you can find the table of available sub-rules you can update:
|
||||
|
||||
| Sub-rule name | OpenAPI Object it corresponds to|
|
||||
|---|---|
|
||||
| root | [OpenAPI Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#oasObject) |
|
||||
| info | [Open API Info Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#infoObject) |
|
||||
| contact | [Open API Contact Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#contactObject) |
|
||||
| discriminator | [Open API Discriminator Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#discriminatorObject) |
|
||||
| encoding | [Open API Encoding Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#encodingObject) |
|
||||
| example | [OpenAPI Example Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject) |
|
||||
| external-docs | [OpenAPI External Documentation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#externalDocumentationObject) |
|
||||
| header | [OpenAPI Header Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#headerObject) |
|
||||
| license | [OpenAPI License Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#licenseObject) |
|
||||
| link | [OpenAPI Link Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#linkObject) |
|
||||
| media-object | [OpenAPI Media Type Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#mediaTypeObject) |
|
||||
| operation | [OpenAPI Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operationObject) |
|
||||
| parameter | [OpenAPI Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject) |
|
||||
| path | [OpenAPI Path Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#pathItemObject) |
|
||||
| request-body | [OpenAPI Request Body Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#requestBodyObject) |
|
||||
| response | [OpenAPI Response Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject) |
|
||||
| schema | [OpenAPI Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject) |
|
||||
| secuirty-schema | [OpenAPI Security Scheme Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#securitySchemeObject)|
|
||||
| auth-code-flow | [Open API Flow Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#oauthFlowObject)|
|
||||
| client-creds-flow | [Open API Flow Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#oauthFlowObject)|
|
||||
| implicit-flow | [Open API Flow Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#oauthFlowObject)|
|
||||
| password-flow | [Open API Flow Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#oauthFlowObject)|
|
||||
| server | [OpenAPI Server Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#serverObject) |
|
||||
| server-variable | [OpenAPI Server Variable Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#serverVariableObject) |
|
||||
| tag | [OpenAPI Tag Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#tagObject) |
|
||||
| xml | [OpenAPI XML Obejct](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#xmlObject) |
|
||||
|
||||
#### no-extra-fields
|
||||
By default, custom fields, not defined within OpenAPI specification can be included only using `x-` prefix. This rule enforces such policy.
|
||||
|
||||
|
||||
## Linting rules
|
||||
### suggest-possible-refs
|
||||
It is not totally uncommon to have a bad `$ref` in your definition. For example, instead of `#components/schemas/User` one might type `#components/schemas/Use`.
|
||||
|
||||
With this rule enabled, @redocly/openapi-cli will try to find the closest possible valid `$ref` address in the definition.
|
||||
|
||||
## Bundling
|
||||
|
||||
Also, you can enable bundling feature, which will bundle your Open API 3 definition into a single file. To do so, modify you config file so that `bundler` object in `rules` would look like following:
|
||||
|
||||
```yaml
|
||||
rules:
|
||||
bundler:
|
||||
output: your-desired-filename.yml
|
||||
```
|
||||
|
||||
Supported extensions for bundle files are `.json`, `.yml` and `.yaml`.
|
||||
|
||||
If the file specified as the bundlers output already exists, it will be overwritten.
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2019 Redoc.ly LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
105
RULES.md
105
RULES.md
@@ -1,34 +1,42 @@
|
||||
# Revalid ruleset configuration
|
||||
# @redocly/openapi-cli ruleset configuration
|
||||
|
||||
## Disabling and configuring rules
|
||||
All of the following rules are configurable in terms of disabling or changing their severity. In order to update given rule, you should modify (or create) the `revalid.config.json` file in the directory from which you are going to run the Revalid.
|
||||
All of the following rules are configurable in terms of disabling or changing their severity. In order to update given rule, you should modify (or create) the `.openapi.yml` file in the directory from which you are going to run the validator.
|
||||
|
||||
Also, you can provide path to configuration file name other than `.openapi.yml` by using `--config` option when running the @redocly/openapi-cli.
|
||||
|
||||
If you are creating it from scratch, you might also want to enable/disable codeframe for the full output.
|
||||
|
||||
Below is the basic structure of this file:
|
||||
Below is the config, which is used by default:
|
||||
|
||||
```json
|
||||
{
|
||||
"enableCodeframe": true,
|
||||
"rules": {
|
||||
"no-extra-fields": "off",
|
||||
"license": {
|
||||
"url": "on"
|
||||
},
|
||||
"license-required": {
|
||||
"level": "warning"
|
||||
},
|
||||
"unique-parameter-names": {
|
||||
"level": "error",
|
||||
},
|
||||
"no-unused-schemas": "off"
|
||||
}
|
||||
}
|
||||
```yaml
|
||||
enableCodeframe: true
|
||||
enbaleCustomRuleset: true
|
||||
rules:
|
||||
bundler: off
|
||||
debug-info: off
|
||||
|
||||
oas3-schema: on
|
||||
path-param-exists: on
|
||||
operation-2xx-response: on
|
||||
unique-parameter-names: on
|
||||
no-unused-schemas: on
|
||||
operation-operationId-unique: on
|
||||
path-declarations-must-exist: on
|
||||
|
||||
api-servers: off
|
||||
license-url: off
|
||||
no-extra-fields: off
|
||||
operation-description: off
|
||||
operation-operationId: off
|
||||
operation-tags: off
|
||||
provide-contact: off
|
||||
servers-no-trailing-slash: off
|
||||
```
|
||||
|
||||
## Ruleset overview
|
||||
|
||||
Below you can find a list of the all currently supported rules. To change your settings for given rule, just add or modify corresponding item in the `rules` section of the `revalid.config.json` in your working directory.
|
||||
Below you can find a list of the all currently supported rules. To change your settings for given rule, just add or modify corresponding item in the `rules` section of the `.openapi.yml` in your working directory.
|
||||
|
||||
### api-servers
|
||||
OpenAPI servers must be present and be a non-empty array.
|
||||
@@ -77,32 +85,23 @@ It depends on tooling are `example.com` and `example.com/` are treated in the sa
|
||||
Parameters in `operation` objects must be `unique` definition wide.
|
||||
|
||||
### oas3-schema
|
||||
This rule enforces the structural validation of the OpenAPI definitions according to the OpenAPI Specification 3.0.2. It can be fine-tuned to disable or change message level for each specific type of the OpenAPI Objects. For example, if you have custom structure of the `servers` object, what you can do to prevent error messages regarding it is to update your `revalid.config.json` to the following pattern:
|
||||
This rule enforces the structural validation of the OpenAPI definitions according to the OpenAPI Specification 3.0.2. It can be fine-tuned to disable or change message level for each specific type of the OpenAPI Objects. For example, if you have custom structure of the `servers` object, what you can do to prevent error messages regarding it is to update your `.redocly.yml` to the following pattern:
|
||||
|
||||
```json
|
||||
{
|
||||
... your configuration
|
||||
"rules": {
|
||||
...other rules,
|
||||
"oas3-schema": {
|
||||
"servers": {
|
||||
"level": "warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```yaml
|
||||
... your configuration
|
||||
rules:
|
||||
...other rules,
|
||||
oas3-schema:
|
||||
servers:
|
||||
level: warning
|
||||
```
|
||||
or even totally disable:
|
||||
```json
|
||||
{
|
||||
... your configuration
|
||||
"rules": {
|
||||
...other rules,
|
||||
"oas3-schema": {
|
||||
"servers": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
```yaml
|
||||
... your configuration
|
||||
rules:
|
||||
...other rules,
|
||||
oas3-schema:
|
||||
servers: off
|
||||
```
|
||||
|
||||
Below, you can find the table of available sub-rules you can update:
|
||||
@@ -115,7 +114,7 @@ Below, you can find the table of available sub-rules you can update:
|
||||
| discriminator | [Open API Discriminator Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#discriminatorObject) |
|
||||
| encoding | [Open API Encoding Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#encodingObject) |
|
||||
| example | [OpenAPI Example Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject) |
|
||||
| documentation | [OpenAPI External Documentation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#externalDocumentationObject) |
|
||||
| external-docs | [OpenAPI External Documentation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#externalDocumentationObject) |
|
||||
| header | [OpenAPI Header Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#headerObject) |
|
||||
| license | [OpenAPI License Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#licenseObject) |
|
||||
| link | [OpenAPI Link Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#linkObject) |
|
||||
@@ -144,4 +143,18 @@ By default, custom fields, not defined within OpenAPI specification can be inclu
|
||||
### suggest-possible-refs
|
||||
It is not totally uncommon to have a bad `$ref` in your definition. For example, instead of `#components/schemas/User` one might type `#components/schemas/Use`.
|
||||
|
||||
With this rule enabled, Revalid will try to find the closest possible valid `$ref` address in the definition.
|
||||
With this rule enabled, @redocly/openapi-cli will try to find the closest possible valid `$ref` address in the definition.
|
||||
|
||||
## Bundling
|
||||
|
||||
Also, you can enable bundling feature, which will bundle your Open API 3 definition into a single file. To do so, modify you config file so that `bundler` object in `rules` would look like following:
|
||||
|
||||
```yaml
|
||||
rules:
|
||||
bundler:
|
||||
output: your-desired-filename.yml
|
||||
```
|
||||
|
||||
Supported extensions for bundle files are `.json`, `.yml` and `.yaml`.
|
||||
|
||||
If the file specified as the bundlers output already exists, it will be overwritten.
|
||||
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@redocly/openapi-cli",
|
||||
"version": "0.1.15",
|
||||
"version": "0.2.0",
|
||||
"description": "",
|
||||
"main": "./dist/index.js",
|
||||
"scripts": {
|
||||
@@ -14,7 +14,11 @@
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"bin": {
|
||||
"openapi-cli": "dist/index.js"
|
||||
"openapi": "dist/index.js"
|
||||
},
|
||||
"repository": {
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/Redocly/openapi-cli.git"
|
||||
},
|
||||
"jest": {
|
||||
"testPathIgnorePatterns": [
|
||||
@@ -26,8 +30,8 @@
|
||||
"/dist/"
|
||||
]
|
||||
},
|
||||
"author": "Serhii Dubovyk",
|
||||
"license": "ISC",
|
||||
"author": "Serhii Dubovyk <serhii@redoc.ly> (https://redoc.ly/)",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.6.0",
|
||||
"@babel/core": "^7.6.0",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
import program from 'commander';
|
||||
import path from 'path';
|
||||
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
openapi: 3.0.0
|
||||
servers:
|
||||
- url: 'https://checkout-test.adyen.com/v1'
|
||||
info:
|
||||
contact:
|
||||
email: support@adyen.com
|
||||
name: Adyen Support
|
||||
url: 'https://support.adyen.com/'
|
||||
x-twitter: Adyen
|
||||
description: |-
|
||||
A web service containing utility functions available for merchants integrating with Checkout APIs.
|
||||
## Authentication
|
||||
Each request to the Checkout Utility API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the Checkout API key](https://docs.adyen.com/developers/user-management/how-to-get-the-checkout-api-key). Then set this key to the `X-API-Key` header value, for example:
|
||||
|
||||
```
|
||||
curl
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: Your_Checkout_API_key" \
|
||||
...
|
||||
```
|
||||
Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/developers/api-reference/live-endpoints).
|
||||
|
||||
## Versioning
|
||||
Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: "vXX", where XX is the version number.
|
||||
|
||||
For example:
|
||||
```
|
||||
https://checkout-test.adyen.com/v1/originKeys
|
||||
```
|
||||
termsOfService: 'https://docs.adyen.com/legal/terms-conditions'
|
||||
title: Adyen Checkout Utility Service
|
||||
version: '1'
|
||||
x-apisguru-categories:
|
||||
- payment
|
||||
x-logo:
|
||||
url: 'https://twitter.com/Adyen/profile_image?size=original'
|
||||
x-origin:
|
||||
- converter:
|
||||
url: 'https://github.com/lucybot/api-spec-converter'
|
||||
version: 2.7.11
|
||||
format: openapi
|
||||
url: 'https://raw.githubusercontent.com/adyen/adyen-openapi/master/specs/3.0/CheckoutUtilityService-v1.json'
|
||||
version: '3.0'
|
||||
x-providerName: adyen.com
|
||||
x-serviceName: CheckoutUtilityService
|
||||
paths:
|
||||
/originKeys:
|
||||
post:
|
||||
operationId: createKey
|
||||
description: This operation takes the origin domains and returns a JSON object containing the corresponding origin keys for the domains.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CheckoutUtilityRequest'
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CheckoutUtilityResponse'
|
||||
description: OK - the request has succeeded.
|
||||
'400':
|
||||
description: Bad Request - a problem reading or understanding the request.
|
||||
'401':
|
||||
description: Unauthorized - authentication required.
|
||||
'403':
|
||||
description: Forbidden - insufficient permissions to process the request.
|
||||
'422':
|
||||
description: Unprocessable Entity - a request validation error.
|
||||
'500':
|
||||
description: Internal Server Error - the server could not process the request.
|
||||
summary: Create originKey values for one or more merchant domains.
|
||||
x-groupName: General
|
||||
x-sortIndex: 0
|
||||
components:
|
||||
schemas:
|
||||
CheckoutUtilityRequest:
|
||||
properties:
|
||||
originDomains:
|
||||
description: 'The list of origin domains, for which origin keys are requested.'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- originDomains
|
||||
CheckoutUtilityResponse:
|
||||
properties:
|
||||
originKeys:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: 'The list of origin keys for all requested domains. For each list item, the key is the domain and the value is the origin key.'
|
||||
type: object
|
||||
x-groups:
|
||||
- General
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,298 +0,0 @@
|
||||
openapi: 3.0.0
|
||||
servers:
|
||||
- url: 'https://api.nexmo.com'
|
||||
info:
|
||||
contact:
|
||||
email: devrel@nexmo.com
|
||||
name: Nexmo DevRel
|
||||
url: 'https://developer.nexmo.com/'
|
||||
description: 'Nexmo provides [Redact API](https://developer.nexmo.com/redact/overview) to help organisations meet their privacy compliance obligations. Redact API allows you to redact private information on demand, allowing you to meet your own compliance needs.'
|
||||
title: Redact
|
||||
version: 1.0.2
|
||||
x-origin:
|
||||
- converter:
|
||||
url: 'https://github.com/lucybot/api-spec-converter'
|
||||
version: 2.7.31
|
||||
format: openapi
|
||||
url: 'https://raw.githubusercontent.com/nexmo/api-specification/master/definitions/redact.yml'
|
||||
version: '3.0'
|
||||
x-providerName: nexmo.com
|
||||
x-serviceName: redact
|
||||
paths:
|
||||
/v1/redact/transaction:
|
||||
post:
|
||||
description: ''
|
||||
operationId: redact-message
|
||||
parameters:
|
||||
- description: Your API key
|
||||
example: abcd1234
|
||||
in: query
|
||||
name: api_key
|
||||
required: true
|
||||
schema:
|
||||
maxLength: 8
|
||||
minLength: 8
|
||||
type: string
|
||||
- description: Your API secret. Required unless `sig` is provided
|
||||
example: abcdef0123456789
|
||||
in: query
|
||||
name: api_secret
|
||||
required: false
|
||||
schema:
|
||||
maxLength: 16
|
||||
minLength: 16
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/RedactTransaction'
|
||||
required: true
|
||||
responses:
|
||||
'204':
|
||||
description: Success
|
||||
'401':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorUnauthorized'
|
||||
description: Authentication failure
|
||||
'403':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ErrorPrematureRedaction'
|
||||
- $ref: '#/components/schemas/ErrorUnprovisioned'
|
||||
description: Authorisation denied
|
||||
'404':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorInvalidId'
|
||||
description: No such record
|
||||
'422':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ErrorInvalidJson'
|
||||
- $ref: '#/components/schemas/ErrorUnsupportedProduct'
|
||||
description: Invalid JSON body
|
||||
'429':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorThrottled'
|
||||
description: Rate Limited
|
||||
summary: Redact a specific message
|
||||
components:
|
||||
schemas:
|
||||
ErrorInvalidId:
|
||||
properties:
|
||||
detail:
|
||||
description: Additional information about the error
|
||||
example: ID '0A000000B0C9A1234' could not be found (type=MT)
|
||||
type: string
|
||||
instance:
|
||||
description: Internal Trace ID
|
||||
example: bf0ca0bf927b3b52e3cb03217e1a1ddf
|
||||
type: string
|
||||
title:
|
||||
description: Generic error message
|
||||
example: Invalid ID
|
||||
type: string
|
||||
type:
|
||||
description: Link to error / remediation options
|
||||
example: 'https://developer.nexmo.com/api-errors#invalid-id'
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
- title
|
||||
- detail
|
||||
- instance
|
||||
type: object
|
||||
ErrorInvalidJson:
|
||||
description: Invalid JSON
|
||||
properties:
|
||||
detail:
|
||||
description: Additional information about the error
|
||||
example: 'Unexpected character (''"'' (code 34)): was expecting comma to separate Object entries'
|
||||
type: string
|
||||
instance:
|
||||
description: Internal Trace ID
|
||||
example: bf0ca0bf927b3b52e3cb03217e1a1ddf
|
||||
type: string
|
||||
title:
|
||||
description: Generic error message
|
||||
example: Invalid JSON
|
||||
type: string
|
||||
type:
|
||||
description: Link to error / remediation options
|
||||
example: 'https://developer.nexmo.com/api-errors#invalid-json'
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
- title
|
||||
- detail
|
||||
- instance
|
||||
type: object
|
||||
ErrorPrematureRedaction:
|
||||
description: Premature Redaction
|
||||
properties:
|
||||
detail:
|
||||
description: Additional information about the error
|
||||
example: You must wait 60 minutes before redacting ID '0A000000B0C9A1234'
|
||||
type: string
|
||||
instance:
|
||||
description: Internal Trace ID
|
||||
example: bf0ca0bf927b3b52e3cb03217e1a1ddf
|
||||
type: string
|
||||
title:
|
||||
description: Generic error message
|
||||
example: Premature Redaction
|
||||
type: string
|
||||
type:
|
||||
description: Link to error / remediation options
|
||||
example: 'https://developer.nexmo.com/api-errors/redact#premature-redaction'
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
- title
|
||||
- detail
|
||||
- instance
|
||||
type: object
|
||||
ErrorThrottled:
|
||||
properties:
|
||||
detail:
|
||||
description: Additional information about the error
|
||||
example: 'Please wait, then retry your request'
|
||||
type: string
|
||||
instance:
|
||||
description: Internal Trace ID
|
||||
example: bf0ca0bf927b3b52e3cb03217e1a1ddf
|
||||
type: string
|
||||
title:
|
||||
description: Generic error message
|
||||
example: Rate Limit Hit
|
||||
type: string
|
||||
type:
|
||||
description: Link to error / remediation options
|
||||
example: 'https://developer.nexmo.com/api-errors/redact#rate-limit'
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
- title
|
||||
- detail
|
||||
- instance
|
||||
type: object
|
||||
ErrorUnauthorized:
|
||||
properties:
|
||||
error_title:
|
||||
description: Error title
|
||||
example: Unauthorized
|
||||
type: string
|
||||
type:
|
||||
description: Machine readable error type
|
||||
example: UNAUTHORIZED
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
- error_title
|
||||
type: object
|
||||
ErrorUnprovisioned:
|
||||
description: Unprovisioned
|
||||
properties:
|
||||
detail:
|
||||
description: Additional information about the error
|
||||
example: User=ABC123 is not provisioned to redact product=SMS
|
||||
type: string
|
||||
instance:
|
||||
description: Internal Trace ID
|
||||
example: bf0ca0bf927b3b52e3cb03217e1a1ddf
|
||||
type: string
|
||||
title:
|
||||
description: Generic error message
|
||||
example: Authorisation error
|
||||
type: string
|
||||
type:
|
||||
description: Link to error / remediation options
|
||||
example: 'https://developer.nexmo.com/api-errors#unprovisioned'
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
- title
|
||||
- detail
|
||||
- instance
|
||||
type: object
|
||||
ErrorUnsupportedProduct:
|
||||
description: Unsupported Product
|
||||
properties:
|
||||
detail:
|
||||
description: Additional information about the error
|
||||
example: No product corresponding to supplied string sms2!
|
||||
type: string
|
||||
instance:
|
||||
description: Internal Trace ID
|
||||
example: bf0ca0bf927b3b52e3cb03217e1a1ddf
|
||||
type: string
|
||||
title:
|
||||
description: Generic error message
|
||||
example: Invalid Product
|
||||
type: string
|
||||
type:
|
||||
description: Link to error / remediation options
|
||||
example: 'https://developer.nexmo.com/api-errors/redact#invalid-product'
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
- title
|
||||
- detail
|
||||
- instance
|
||||
type: object
|
||||
RedactTransaction:
|
||||
properties:
|
||||
id:
|
||||
description: The transaction ID to redact
|
||||
type: string
|
||||
product:
|
||||
description: Product name that the ID provided relates to
|
||||
enum:
|
||||
- sms
|
||||
- voice
|
||||
- number-insight
|
||||
- verify
|
||||
- verify-sdk
|
||||
- messages
|
||||
example: sms
|
||||
type: string
|
||||
type:
|
||||
default: outbound
|
||||
description: Required if redacting SMS data
|
||||
enum:
|
||||
- inbound
|
||||
- outbound
|
||||
example: outbound
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- product
|
||||
- type
|
||||
type: object
|
||||
securitySchemes:
|
||||
basicAuth:
|
||||
scheme: basic
|
||||
type: http
|
||||
x-errors:
|
||||
invalid-product:
|
||||
description: The provided product is invalid
|
||||
link:
|
||||
text: View API reference
|
||||
url: '/api/redact#transaction'
|
||||
resolution: Modify your request to provide a valid product
|
||||
premature-redaction:
|
||||
description: There is a 1 hour time period before data can be redacted to allow for all data to propagate through the Nexmo system
|
||||
resolution: Wait until the data becomes valid for redaction
|
||||
rate-limit:
|
||||
description: The request was rate limited
|
||||
resolution: The Redact API supports 170 requests per second. Slow down your request rate
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,983 +0,0 @@
|
||||
openapi: 3.0.0
|
||||
servers:
|
||||
- url: 'https://api.tomtom.com'
|
||||
info:
|
||||
contact:
|
||||
x-twitter: TomTom
|
||||
description: |-
|
||||
The Maps API web services suite offers the following APIs:
|
||||
- Raster
|
||||
The Maps Raster API renders map data that is divided into gridded sections called tiles. Tiles are square images (png or jpg format) in various sizes which are available at 19 different zoom levels, ranging from 0 to 20. For zoom level 0, the entire earth is displayed on one single tile, while at zoom level 20, the world is divided into 2<sup>40</sup> tiles.
|
||||
- Vector
|
||||
Similar to Maps Raster API, the Maps Vector API serves data on different zoom level ranging from 0 to 22. For zoom level 0, the entire earth is displayed on one single tile, while at zoom level 22, the world is divided into 2<sup>44</sup> tiles.
|
||||
The Maps Vector Service delivers geographic map data packaged in a vector representation of squared sections called vector tiles. Each tile includes pre-defined collections of map features (points, lines, road shapes, water polygons, building footprints, ect.) delivered in one of the specified vector formats. Format of the tile is formally described using protobuf schema.
|
||||
title: Maps
|
||||
version: 1.0.0
|
||||
x-apisguru-categories:
|
||||
- location
|
||||
x-logo:
|
||||
url: 'https://twitter.com/TomTom/profile_image?size=original'
|
||||
x-origin:
|
||||
- converter:
|
||||
url: 'https://github.com/lucybot/api-spec-converter'
|
||||
version: 2.7.31
|
||||
format: openapi
|
||||
url: 'https://developer.tomtom.com/system/files/swagger_models/maps_api_0.yaml'
|
||||
version: '3.0'
|
||||
x-providerName: tomtom.com
|
||||
x-serviceName: maps
|
||||
security:
|
||||
- api_key: []
|
||||
paths:
|
||||
'/map/{versionNumber}/copyrights.{format}':
|
||||
get:
|
||||
description: |-
|
||||
The Copyrights API returns copyright information for
|
||||
the Maps API Raster Tile Service in JSON, JSONP, or XML format.
|
||||
This call returns copyright information for the whole world.
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: Format of the response
|
||||
in: path
|
||||
name: format
|
||||
required: true
|
||||
schema:
|
||||
default: xml
|
||||
enum:
|
||||
- json
|
||||
- jsonp
|
||||
- xml
|
||||
type: string
|
||||
- description: Specifies the jsonp callback method. Only used when format is jsonp
|
||||
in: query
|
||||
name: callback
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'304':
|
||||
description: <b>Not Modified</b>
|
||||
'400':
|
||||
description: |-
|
||||
<b>Malformed request</b>: malformed syntax. Possible causes include:
|
||||
- requested syntax is not available
|
||||
'403':
|
||||
description: '<b>Forbidden</b>: Supplied API key is not valid for this request'
|
||||
'410':
|
||||
description: '<b>Gone</b>: Request for unsupported format'
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the TomTom Copyrights
|
||||
API service
|
||||
summary: Copyrights whole world
|
||||
tags:
|
||||
- Copyrights
|
||||
'/map/{versionNumber}/copyrights/caption.{format}':
|
||||
get:
|
||||
description: This API returns copyright captions for the map service.
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1.
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: Format of the response
|
||||
in: path
|
||||
name: format
|
||||
required: true
|
||||
schema:
|
||||
default: xml
|
||||
enum:
|
||||
- json
|
||||
- jsonp
|
||||
- xml
|
||||
type: string
|
||||
- description: Specifies the jsonp callback method. Only used when format is jsonp
|
||||
in: query
|
||||
name: callback
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'304':
|
||||
description: <b>Not Modified</b>
|
||||
'400':
|
||||
description: |-
|
||||
<b>Malformed request</b>: malformed syntax. Possible causes include:
|
||||
- requested syntax is not available
|
||||
'403':
|
||||
description: '<b>Forbidden</b>: Supplied API key is not valid for this request'
|
||||
'410':
|
||||
description: '<b>Gone</b>: Request for unsupported format'
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the TomTom Copyrights
|
||||
API service
|
||||
summary: Captions
|
||||
tags:
|
||||
- Copyrights
|
||||
'/map/{versionNumber}/copyrights/{minLon}/{minLat}/{maxLon}/{maxLat}.{format}':
|
||||
get:
|
||||
description: |-
|
||||
The Copyrights API returns copyright information for
|
||||
the Maps API Raster Tile Service in JSON, JSONP, or XML format.
|
||||
This call returns copyright information for a specific bounding box.
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: Format of the response
|
||||
in: path
|
||||
name: format
|
||||
required: true
|
||||
schema:
|
||||
default: xml
|
||||
enum:
|
||||
- json
|
||||
- jsonp
|
||||
- xml
|
||||
type: string
|
||||
- description: Minimum longitude coordinate of bounding box defined in terms of latitude/longitude.
|
||||
example: -179.1506
|
||||
in: path
|
||||
name: minLon
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
- description: Minimum latitude coordinate of bounding box defined in terms of latitude/longitude.
|
||||
example: 18.9117
|
||||
in: path
|
||||
name: minLat
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
- description: Maximum longitude coordinate of bounding box defined in terms of latitude/longitude.
|
||||
example: -66.9406
|
||||
in: path
|
||||
name: maxLon
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
- description: Maximum latitude coordinate of bounding box defined in terms of latitude/longitude.
|
||||
example: 71.441
|
||||
in: path
|
||||
name: maxLat
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
- description: Specifies the jsonp callback method. Only used when format is jsonp.
|
||||
in: query
|
||||
name: callback
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'304':
|
||||
description: <b>Not Modified</b>
|
||||
'400':
|
||||
description: |-
|
||||
<b>Malformed request</b>: malformed syntax. Possible causes include:
|
||||
- requested syntax is not available
|
||||
'401':
|
||||
description: |-
|
||||
<b>Bad request</b>: Parameters out of range. Possible causes include:
|
||||
- minLon n is out of range [-180,180]: the requested minimum longitude coordinate is out of possible range
|
||||
- minLat n is out of range [-90,90]: the requested minimum latitude coordinate is out of possible range
|
||||
- maxLon n is out of range [-180,180]: the requested maximum longitude coordinate is out of possible range
|
||||
- maxLat n is out of range [-90,90]: the requested minimum latitude coordinate is out of possible range
|
||||
'403':
|
||||
description: '<b>Forbidden</b>: Supplied API key is not valid for this request'
|
||||
'410':
|
||||
description: '<b>Gone</b>: Request for unsupported format'
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the TomTom Copyrights
|
||||
API service
|
||||
summary: Copyrights bounding box
|
||||
tags:
|
||||
- Copyrights
|
||||
'/map/{versionNumber}/copyrights/{zoom}/{X}/{Y}.{format}':
|
||||
get:
|
||||
description: |-
|
||||
The Copyrights API returns copyright information for
|
||||
the Maps API Raster Tile Service in JSON, JSONP, or XML format.
|
||||
This call returns copyright information for the a specific map tile.
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: Format of the response
|
||||
in: path
|
||||
name: format
|
||||
required: true
|
||||
schema:
|
||||
default: xml
|
||||
enum:
|
||||
- json
|
||||
- jsonp
|
||||
- xml
|
||||
type: string
|
||||
- description: |-
|
||||
Zoom level of tile to be rendered. Only used for tile-level
|
||||
copyright calls.
|
||||
example: 0
|
||||
in: path
|
||||
name: zoom
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
- 10
|
||||
- 11
|
||||
- 12
|
||||
- 13
|
||||
- 14
|
||||
- 15
|
||||
- 16
|
||||
- 17
|
||||
- 18
|
||||
type: integer
|
||||
- description: |-
|
||||
X coordinate of the tile on zoom grid. Only used for tile-level
|
||||
copyright calls.
|
||||
example: 0
|
||||
in: path
|
||||
name: X
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: |-
|
||||
Y coordinate of the tile on zoom grid. Only used for tile-level
|
||||
copyright calls.
|
||||
example: 0
|
||||
in: path
|
||||
name: 'Y'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: Specifies the jsonp callback method. Only used when format is jsonp.
|
||||
in: query
|
||||
name: callback
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'304':
|
||||
description: <b>Not Modified</b>
|
||||
'400':
|
||||
description: |-
|
||||
<b>Malformed request</b>: malformed syntax. Possible causes include:
|
||||
- requested syntax is not available
|
||||
'401':
|
||||
description: |-
|
||||
<b>Bad request</b>: Parameters out of range. Possible causes include:
|
||||
- zoom n is out of range 0 <= zoom < 19: the requested zoom level is out of the possible range
|
||||
- x n is out of range [0,m]: the requested x coordinate is out of the possible range (the value of m will vary depending on zoom level)
|
||||
- y n is out of range [0,m]: the requested y coordinate is out of the possible range (the value of m will vary depending on zoom level)
|
||||
'403':
|
||||
description: '<b>Forbidden</b>: Supplied API key is not valid for this request'
|
||||
'410':
|
||||
description: '<b>Gone</b>: Request for unsupported format'
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the TomTom Copyrights
|
||||
API service
|
||||
summary: Copyrights tile
|
||||
tags:
|
||||
- Copyrights
|
||||
'/map/{versionNumber}/staticimage':
|
||||
get:
|
||||
description: |-
|
||||
The Static Image service renders a rectangular raster image
|
||||
in the style, size, and zoom level specified. The image can be requested
|
||||
using either a center point plus width and height or a bounding box.
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1.
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: |-
|
||||
Layer of image to be rendered. <em>Hybrid</em> and <em>labels</em>
|
||||
are intended for layering with other data and are only available in <em>png</em> format.
|
||||
example: basic
|
||||
in: query
|
||||
name: layer
|
||||
required: false
|
||||
schema:
|
||||
default: basic
|
||||
enum:
|
||||
- basic
|
||||
- hybrid
|
||||
- labels
|
||||
type: string
|
||||
- description: Map style to be returned
|
||||
example: main
|
||||
in: query
|
||||
name: style
|
||||
required: false
|
||||
schema:
|
||||
default: main
|
||||
enum:
|
||||
- main
|
||||
- night
|
||||
type: string
|
||||
- description: Image format to be returned
|
||||
example: png
|
||||
in: query
|
||||
name: format
|
||||
required: false
|
||||
schema:
|
||||
default: png
|
||||
enum:
|
||||
- png
|
||||
- jpg
|
||||
- jpeg
|
||||
type: string
|
||||
- description: Zoom level of map image to be returned.
|
||||
in: query
|
||||
name: zoom
|
||||
required: false
|
||||
schema:
|
||||
default: 12
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
- 10
|
||||
- 11
|
||||
- 12
|
||||
- 13
|
||||
- 14
|
||||
- 15
|
||||
- 16
|
||||
- 17
|
||||
- 18
|
||||
- 19
|
||||
- 20
|
||||
- 21
|
||||
- 22
|
||||
type: integer
|
||||
- description: |-
|
||||
Coordinates for the center point of the image.
|
||||
Must be used with the <strong>width</strong> and
|
||||
<strong>height</strong> parameters; cannot be used with <strong>bbox</strong>.
|
||||
Uses EPSG:3857 projection (functionally equivalent to EPSG:900910).
|
||||
example: '4.899886, 52.379031'
|
||||
in: query
|
||||
name: center
|
||||
required: false
|
||||
schema:
|
||||
pattern: '^-*\d+\.*\d*, *-*\d+\.*\d*$'
|
||||
type: string
|
||||
- description: Width of the resulting image in pixels. Width must be a positive integer between 1 and 8192.
|
||||
example: 512
|
||||
in: query
|
||||
name: width
|
||||
required: false
|
||||
schema:
|
||||
default: 512
|
||||
maximum: 8192
|
||||
minimum: 1
|
||||
type: integer
|
||||
- description: Height of the resulting image in pixels. Height must be a positive integer between 1 and 8192.
|
||||
example: 512
|
||||
in: query
|
||||
name: height
|
||||
required: false
|
||||
schema:
|
||||
default: 512
|
||||
maximum: 8192
|
||||
minimum: 1
|
||||
type: integer
|
||||
- description: |-
|
||||
Bounding box for the image, using EPSG:3857 projection (functionally equivalent to EPSG:900910).
|
||||
Values <strong>must</strong> be in the order of minLon, minLat, maxLon, maxLat.
|
||||
MaxLat must be greater than minLat. Longitude values can be on both sides of the 180th meridian.
|
||||
Cannot be used with <strong>center</strong>, <strong>width</strong>, or <strong>height</strong> parameters.
|
||||
in: query
|
||||
name: bbox
|
||||
required: false
|
||||
schema:
|
||||
pattern: '^(-*\d+\.*\d*,){3}(-*\d+\.*\d*)$'
|
||||
type: string
|
||||
- description: Geopolitical view. Determines rendering of disputed areas. See the <a href="/maps-api/maps-api-documentation-raster/raster-tile">documentation</a> for an explanation of how this works in live services.
|
||||
example: Unified
|
||||
in: query
|
||||
name: view
|
||||
required: false
|
||||
schema:
|
||||
enum:
|
||||
- Unified
|
||||
- IN
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'400':
|
||||
description: |-
|
||||
<b>Bad Request</b>: Received by the interface, but there is an error
|
||||
in the request, such as:
|
||||
- one or more of the required parameters is missing
|
||||
- unsupported or unrecognized parameter value
|
||||
- two or more mutually exclusive parameters are used in the same query (e.g. mixing center/width/height and bbox.)
|
||||
- minimum latitude is greater than maximum latitude in a bbox call
|
||||
- layer containing alpha channel is requested in format not supporting the alpha channel
|
||||
This code is returned if the required parameters of the request were
|
||||
malformed. A detailed exception explanation is returned in a
|
||||
response in form of Service Exception Report.
|
||||
'403':
|
||||
description: |-
|
||||
<b>Forbidden</b>:
|
||||
- supplied API key is not valid for the request
|
||||
- the requested view is not available in the country where the request was sent from
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the Static Map
|
||||
Service.
|
||||
'503':
|
||||
description: <b>Service currently unavailable.</b>
|
||||
summary: Static Image
|
||||
tags:
|
||||
- Raster
|
||||
'/map/{versionNumber}/tile/{layer}/{style}/{zoom}/{X}/{Y}.pbf':
|
||||
get:
|
||||
description: 'The Maps API Vector Service delivers vector tiles, which are representations of square sections of map data.'
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: Layer of tile to be rendered
|
||||
example: basic
|
||||
in: path
|
||||
name: layer
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- basic
|
||||
- hybrid
|
||||
- labels
|
||||
type: string
|
||||
- description: Style of tile to be rendered
|
||||
example: main
|
||||
in: path
|
||||
name: style
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- main
|
||||
type: string
|
||||
- description: Zoom level of tile to be rendered
|
||||
example: 0
|
||||
in: path
|
||||
name: zoom
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
- 10
|
||||
- 11
|
||||
- 12
|
||||
- 13
|
||||
- 14
|
||||
- 15
|
||||
- 16
|
||||
- 17
|
||||
- 18
|
||||
- 19
|
||||
- 20
|
||||
- 21
|
||||
- 22
|
||||
type: integer
|
||||
- description: x coordinate of tile on zoom grid
|
||||
example: 0
|
||||
in: path
|
||||
name: X
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: y coordinate of tile on zoom grid
|
||||
example: 0
|
||||
in: path
|
||||
name: 'Y'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: Geopolitical view. Determines rendering of disputed areas. See the <a href="/maps-api/maps-api-documentation-vector/tile">documentation</a> for an explanation of how this works in live services.
|
||||
example: Unified
|
||||
in: query
|
||||
name: view
|
||||
required: false
|
||||
schema:
|
||||
enum:
|
||||
- Unified
|
||||
- IL
|
||||
- IN
|
||||
type: string
|
||||
- description: 'Language to be used for labels in the response. The default is NGT: Neutral Ground Truth, which uses each place''s local official language and script (where available). See the <a href="/maps-api/maps-api-documentation-vector/tile">documentation</a> for a full list of options.'
|
||||
in: query
|
||||
name: language
|
||||
schema:
|
||||
default: NGT
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'400':
|
||||
description: |-
|
||||
<b>Bad request</b>: Usually the result of malformed syntax:
|
||||
- the given combination of layer, style, and query parameters is not supported
|
||||
- zoom n is out of range 0 <= zoom <= 22: the requested zoom level is out of the possible range
|
||||
- x n is out of range [0,m]: the requested x coordinate is out of the possible range (the value of m will vary depending on zoom level)
|
||||
- y n is out of range [0,m]: the requested y coordinate is out of the possible range (the value of m will vary depending on zoom level)
|
||||
- the requested view is not supported
|
||||
'403':
|
||||
description: |-
|
||||
<b>Forbidden</b>:
|
||||
- the supplied API key is not valid for this request
|
||||
- the requested view is not available in your country
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the TomTom
|
||||
Maps API Vector Tile service
|
||||
'503':
|
||||
description: <b>Service currently unavailable</b>.
|
||||
summary: Tile
|
||||
tags:
|
||||
- Vector
|
||||
'/map/{versionNumber}/tile/{layer}/{style}/{zoom}/{X}/{Y}.{format}':
|
||||
get:
|
||||
description: 'The Maps API Raster Service delivers raster tiles, which are representations of square sections of map data.'
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1.
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: Layer of tile to be rendered. <em>Hybrid</em> and <em>labels</em> are intended for layering with other data and are only available in <em>png</em> format.
|
||||
example: basic
|
||||
in: path
|
||||
name: layer
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- basic
|
||||
- hybrid
|
||||
- labels
|
||||
type: string
|
||||
- description: Style of tile to be rendered
|
||||
example: main
|
||||
in: path
|
||||
name: style
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- main
|
||||
- night
|
||||
type: string
|
||||
- description: Zoom level of tile to be rendered
|
||||
example: 0
|
||||
in: path
|
||||
name: zoom
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
- 10
|
||||
- 11
|
||||
- 12
|
||||
- 13
|
||||
- 14
|
||||
- 15
|
||||
- 16
|
||||
- 17
|
||||
- 18
|
||||
- 19
|
||||
- 20
|
||||
- 21
|
||||
- 22
|
||||
type: integer
|
||||
- description: x coordinate of tile on zoom grid
|
||||
example: 0
|
||||
in: path
|
||||
name: X
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: y coordinate of tile on zoom grid
|
||||
example: 0
|
||||
in: path
|
||||
name: 'Y'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: Format of the response.
|
||||
example: png
|
||||
in: path
|
||||
name: format
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- jpg
|
||||
- png
|
||||
type: string
|
||||
- description: Tile dimensions in pixels. <em>512</em> is only available for the <em>main</em> style and <em>basic</em> or <em>labels</em> layers.
|
||||
in: query
|
||||
name: tileSize
|
||||
required: false
|
||||
schema:
|
||||
default: 256
|
||||
enum:
|
||||
- 256
|
||||
- 512
|
||||
type: integer
|
||||
- description: 'Geopolitical view. Determines rendering of disputed areas. See the <a href="/maps-sdk-web/functional-examples#geopolitical-views">documentation</a> for an explanation of how this works in live services.'
|
||||
example: Unified
|
||||
in: query
|
||||
name: view
|
||||
required: false
|
||||
schema:
|
||||
enum:
|
||||
- Unified
|
||||
- IN
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'302':
|
||||
description: '<b>Found</b>: URL redirection'
|
||||
'400':
|
||||
description: |-
|
||||
<b>Bad request</b>: Usually the result of malformed syntax:
|
||||
- the given combination of layer, style, and query parameters is not supported
|
||||
- zoom n is out of range 0 <= zoom < 19: the requested zoom level is out of the possible range
|
||||
- x n is out of range [0,m]: the requested x coordinate is out of the possible range (the value of m will vary depending on zoom level)
|
||||
- y n is out of range [0,m]: the requested y coordinate is out of the possible range (the value of m will vary depending on zoom level)
|
||||
- the requested view is not supported
|
||||
'403':
|
||||
description: |-
|
||||
<b>Forbidden</b>:
|
||||
- the supplied API key is not valid for this request
|
||||
- the requested view is not available in the country where the request was sent from
|
||||
'410':
|
||||
description: '<b>Gone</b>: Request for unsupported format'
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the TomTom
|
||||
Maps API Raster Tile service
|
||||
summary: Tile
|
||||
tags:
|
||||
- Raster
|
||||
'/map/{versionNumber}/wms/':
|
||||
get:
|
||||
description: |-
|
||||
The GetMap call implements the Web Map Service 1.1.1 standard
|
||||
to access TomTom raster map tiles. This service is described
|
||||
in the response to the GetCapabilities API call.
|
||||
operationId: GetMap
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: Request type
|
||||
in: query
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- GetMap
|
||||
type: string
|
||||
- description: |-
|
||||
Projection used in describing the <b>bbox</b> EPSG:3857 is
|
||||
recommended, particularly at higher zoom levels. (Note that
|
||||
EPSG:3857 is functionally equivalent to EPSG:900913/EPSG:3785)
|
||||
example: 'EPSG:4326'
|
||||
in: query
|
||||
name: srs
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 'EPSG:3857'
|
||||
- 'EPSG:4326'
|
||||
type: string
|
||||
- description: |-
|
||||
Bounding box in the projection stated in <b>srs</b>
|
||||
(minLon,minLat,maxLon,maxLat)
|
||||
example: '-0.489,51.28,0.236,51.686'
|
||||
in: query
|
||||
name: bbox
|
||||
required: true
|
||||
schema:
|
||||
pattern: '^(-*\d+\.*\d*, *){3}(-*\d+\.*\d*)$'
|
||||
type: string
|
||||
- description: 'Width of the resulting image, in pixels Maximum value is 2048'
|
||||
example: 512
|
||||
in: query
|
||||
name: width
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: 'Height of the resulting image, in pixels Maximum value is 2048'
|
||||
example: 512
|
||||
in: query
|
||||
name: height
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: Image format to be returned
|
||||
example: image/png
|
||||
in: query
|
||||
name: format
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- image/jpeg
|
||||
- image/png
|
||||
type: string
|
||||
- description: Map layers requested Currently only the basic layer is available
|
||||
in: query
|
||||
name: layers
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- basic
|
||||
type: string
|
||||
- allowEmptyValue: true
|
||||
description: |-
|
||||
Map styles to be returned. Currently, no styles are available. This
|
||||
parameter is present for forward compatibility; it must be used and
|
||||
left blank.
|
||||
in: query
|
||||
name: styles
|
||||
required: false
|
||||
schema:
|
||||
enum:
|
||||
- ''
|
||||
type: string
|
||||
- description: Service type
|
||||
in: query
|
||||
name: service
|
||||
required: false
|
||||
schema:
|
||||
enum:
|
||||
- WMS
|
||||
type: string
|
||||
- description: WMS service version
|
||||
in: query
|
||||
name: version
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1.1.1
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'202':
|
||||
description: |-
|
||||
<b>Accepted</b>: Received by the interface, but there is a WMS exception in
|
||||
processing it. Possible causes include:
|
||||
- one or more required parameters is missing
|
||||
- unsupported or unrecognized parameter value
|
||||
- malformed bounding box requested
|
||||
- invalid map dimensions requested
|
||||
|
||||
This code is returned if the parameters of the request were malformed.
|
||||
The response includes a detailed explanation in the Service Exception Report.
|
||||
'401':
|
||||
description: '<b>Unauthorized</b>: Supplied API key is not valid for the request'
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the TomTom WMS
|
||||
service
|
||||
summary: GetMap
|
||||
tags:
|
||||
- WMS / WMTS
|
||||
'/map/{versionNumber}/wms//':
|
||||
get:
|
||||
description: |-
|
||||
The GetCapabilities call is part of TomTom's implementation of version 1.1.1
|
||||
the Web Map Service (WMS). It provides descriptions of the other calls
|
||||
that are available in the implementation.
|
||||
operationId: GetCapabilities
|
||||
parameters:
|
||||
- in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- in: query
|
||||
name: service
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- WMS
|
||||
type: string
|
||||
- in: query
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- GetCapabilities
|
||||
type: string
|
||||
- description: WMS service version
|
||||
in: query
|
||||
name: version
|
||||
required: false
|
||||
schema:
|
||||
enum:
|
||||
- 1.1.1
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'202':
|
||||
description: |-
|
||||
<b>Accepted</b>: Received by the interface, but there is a WMS exception in
|
||||
processing it. Possible causes include:
|
||||
- one or more required parameters is missing
|
||||
- unsupported or unrecognized parameter value
|
||||
- malformed bounding box requested
|
||||
- invalid map dimensions requested
|
||||
|
||||
This code is returned if the parameters of the request were malformed.
|
||||
The response includes a detailed explanation in the Service Exception Report.
|
||||
'401':
|
||||
description: '<b>Unauthorized</b>: Supplied API key is not valid for the request'
|
||||
'500':
|
||||
description: |-
|
||||
<b>Internal Server Error</b>: There is a problem with the TomTom WMS
|
||||
service
|
||||
summary: GetCapabilities
|
||||
tags:
|
||||
- WMS / WMTS
|
||||
'/map/{versionNumber}/wmts/{key}/{wmtsVersion}/WMTSCapabilities.xml':
|
||||
get:
|
||||
description: |-
|
||||
The WMTS GetCapabilities call implements version 1.0.0 of
|
||||
the <a href="http://www.opengeospatial.org/standards/wmts">Web Map Tile Service</a>
|
||||
(WMTS) standard. It returns metadata that allows compatible calling systems to construct
|
||||
calls to TomTom's raster map tile service. See the
|
||||
<a href="/maps-api/maps-api-documentation-raster/wmts">documentation</a>
|
||||
for more information on WMTS.
|
||||
parameters:
|
||||
- description: Version of the service to call. The current version is 1
|
||||
in: path
|
||||
name: versionNumber
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1
|
||||
type: integer
|
||||
- description: Your API key for calling this service.
|
||||
in: path
|
||||
name: key
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: wmtsVersion
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- 1.0.0
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: <b>OK</b>
|
||||
'400':
|
||||
description: '<b>Bad request</b>: Probably malformed syntax'
|
||||
'401':
|
||||
description: '<b>Unauthorized</b>: Supplied API key is not valid for this request'
|
||||
'500':
|
||||
description: '<b>Internal Server Error</b>: There is a problem with the TomTom WMTS service'
|
||||
security: []
|
||||
summary: WMTS
|
||||
tags:
|
||||
- WMS / WMTS
|
||||
components:
|
||||
securitySchemes:
|
||||
api_key:
|
||||
in: query
|
||||
name: key
|
||||
type: apiKey
|
||||
@@ -1,311 +0,0 @@
|
||||
openapi: 3.0.0
|
||||
servers:
|
||||
- url: 'https://api.vonage.com/t/vbc.prod/provisioning'
|
||||
info:
|
||||
contact:
|
||||
name: Account API
|
||||
url: 'https://businesssupport.vonage.com/contactus'
|
||||
description: Retrieve information about accounts.
|
||||
license:
|
||||
name: Vonage
|
||||
url: 'https://www.vonage.com/business/legal-policy-center/business-cloud/tos'
|
||||
title: Account
|
||||
version: 1.11.7
|
||||
x-origin:
|
||||
- converter:
|
||||
url: 'https://github.com/lucybot/api-spec-converter'
|
||||
version: 2.7.31
|
||||
format: openapi
|
||||
url: 'https://raw.githubusercontent.com/nexmo/api-specification/master/definitions/vonage-business-cloud/account.yml'
|
||||
version: '3.0'
|
||||
x-providerName: vonage.com
|
||||
x-serviceName: account
|
||||
paths:
|
||||
'/api/accounts/{account_id}':
|
||||
get:
|
||||
operationId: AccountCtrl.getAccountServicesByAccountID
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/AccountID'
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/AccountHalResponse'
|
||||
description: Success
|
||||
'404':
|
||||
description: Account not found
|
||||
security:
|
||||
- bearerAuth: []
|
||||
summary: Get account data by ID
|
||||
'/api/accounts/{account_id}/locations':
|
||||
get:
|
||||
operationId: AccountCtrl.getLocationsByAccountID
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/AccountID'
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LocationsHalResponse'
|
||||
description: Success
|
||||
security:
|
||||
- bearerAuth: []
|
||||
summary: Get account locations data by account ID
|
||||
'/api/accounts/{account_id}/locations/{location_id}':
|
||||
get:
|
||||
operationId: AccountCtrl.getLocationByID
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/AccountID'
|
||||
- description: The location ID
|
||||
example: 123456
|
||||
in: path
|
||||
name: location_id
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LocationHalResponse'
|
||||
description: Success
|
||||
'404':
|
||||
description: Location not found
|
||||
security:
|
||||
- bearerAuth: []
|
||||
summary: Get location data by account ID and location ID
|
||||
components:
|
||||
parameters:
|
||||
AccountID:
|
||||
description: The account ID
|
||||
example: 123456
|
||||
in: path
|
||||
name: account_id
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
schemas:
|
||||
Account:
|
||||
properties:
|
||||
address:
|
||||
$ref: '#/components/schemas/Address'
|
||||
id:
|
||||
description: Unique identifier of the account
|
||||
example: 123456
|
||||
type: number
|
||||
name:
|
||||
description: Name of the account
|
||||
example: Vonage
|
||||
type: string
|
||||
status:
|
||||
description: Status of the account
|
||||
example: ACTIVE
|
||||
type: string
|
||||
type: object
|
||||
AccountEmbeddedObject:
|
||||
description: Account object
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/Account'
|
||||
type: object
|
||||
AccountHalResponse:
|
||||
properties:
|
||||
_embedded:
|
||||
$ref: '#/components/schemas/AccountEmbeddedObject'
|
||||
_links:
|
||||
$ref: '#/components/schemas/Links'
|
||||
page:
|
||||
description: Current page number
|
||||
example: 1
|
||||
type: number
|
||||
page_size:
|
||||
description: Number of records per page
|
||||
example: 100
|
||||
type: number
|
||||
total_items:
|
||||
description: Total number of records
|
||||
example: 100
|
||||
type: number
|
||||
total_pages:
|
||||
description: Total number of pages
|
||||
example: 10
|
||||
type: number
|
||||
type: object
|
||||
Address:
|
||||
properties:
|
||||
address_1:
|
||||
description: Street portion of the address
|
||||
example: 123 Example Street
|
||||
type: string
|
||||
address_2:
|
||||
description: Additional address information
|
||||
example: Apt. 456
|
||||
type: string
|
||||
city:
|
||||
description: City name
|
||||
example: Holmdel
|
||||
type: string
|
||||
country:
|
||||
description: Country code
|
||||
example: US
|
||||
type: string
|
||||
postal_code:
|
||||
description: Postal code
|
||||
example: '07733'
|
||||
type: string
|
||||
state:
|
||||
description: State/Province code
|
||||
example: NJ
|
||||
type: string
|
||||
type: object
|
||||
AddressWithTimeZone:
|
||||
properties:
|
||||
address_1:
|
||||
description: Street portion of the address
|
||||
example: 123 Example Street
|
||||
type: string
|
||||
address_2:
|
||||
description: Additional address information
|
||||
example: Apt. 456
|
||||
type: string
|
||||
city:
|
||||
description: City name
|
||||
example: Holmdel
|
||||
type: string
|
||||
country:
|
||||
description: Country code
|
||||
example: US
|
||||
type: string
|
||||
postal_code:
|
||||
description: Postal code
|
||||
example: '07733'
|
||||
type: string
|
||||
state:
|
||||
description: State/Province code
|
||||
example: NJ
|
||||
type: string
|
||||
time_zone:
|
||||
description: Time zone
|
||||
example: America/New York
|
||||
type: string
|
||||
type: object
|
||||
FirstHref:
|
||||
description: URL to the first page of records
|
||||
properties:
|
||||
href:
|
||||
type: string
|
||||
type: object
|
||||
LastHref:
|
||||
description: URL to the last page of records
|
||||
properties:
|
||||
href:
|
||||
type: string
|
||||
type: object
|
||||
Links:
|
||||
properties:
|
||||
first:
|
||||
$ref: '#/components/schemas/FirstHref'
|
||||
last:
|
||||
$ref: '#/components/schemas/LastHref'
|
||||
next:
|
||||
$ref: '#/components/schemas/NextHref'
|
||||
prev:
|
||||
$ref: '#/components/schemas/PrevHref'
|
||||
self:
|
||||
$ref: '#/components/schemas/SelfHref'
|
||||
type: object
|
||||
Location:
|
||||
properties:
|
||||
address:
|
||||
$ref: '#/components/schemas/AddressWithTimeZone'
|
||||
id:
|
||||
description: Unique identifier of the location
|
||||
example: 123456
|
||||
type: number
|
||||
name:
|
||||
description: Name of the location
|
||||
example: Headquarters
|
||||
type: string
|
||||
type: object
|
||||
LocationEmbeddedObject:
|
||||
description: Location object
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/Location'
|
||||
type: object
|
||||
LocationHalResponse:
|
||||
properties:
|
||||
_embedded:
|
||||
$ref: '#/components/schemas/LocationEmbeddedObject'
|
||||
_links:
|
||||
$ref: '#/components/schemas/Links'
|
||||
page:
|
||||
description: Current page number
|
||||
example: 1
|
||||
type: number
|
||||
page_size:
|
||||
description: Number of records per page
|
||||
example: 100
|
||||
type: number
|
||||
total_items:
|
||||
description: Total number of records
|
||||
example: 100
|
||||
type: number
|
||||
total_pages:
|
||||
description: Total number of pages
|
||||
example: 10
|
||||
type: number
|
||||
type: object
|
||||
LocationsEmbeddedObject:
|
||||
description: Collection of location objects
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/Location'
|
||||
type: array
|
||||
type: object
|
||||
LocationsHalResponse:
|
||||
properties:
|
||||
_embedded:
|
||||
$ref: '#/components/schemas/LocationsEmbeddedObject'
|
||||
_links:
|
||||
$ref: '#/components/schemas/Links'
|
||||
page:
|
||||
example: 1
|
||||
type: number
|
||||
page_size:
|
||||
example: 100
|
||||
type: number
|
||||
total_items:
|
||||
example: 100
|
||||
type: number
|
||||
total_pages:
|
||||
example: 10
|
||||
type: number
|
||||
type: object
|
||||
NextHref:
|
||||
description: URL to the next page of records
|
||||
properties:
|
||||
href:
|
||||
type: string
|
||||
type: object
|
||||
PrevHref:
|
||||
description: URL to the previous page of records
|
||||
properties:
|
||||
href:
|
||||
type: string
|
||||
type: object
|
||||
SelfHref:
|
||||
description: URL to the current page of records
|
||||
properties:
|
||||
href:
|
||||
type: string
|
||||
type: object
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
bearerFormat: OAuth
|
||||
scheme: bearer
|
||||
type: http
|
||||
@@ -1,9 +0,0 @@
|
||||
version: 3.0.0
|
||||
info:
|
||||
title: Simple spec
|
||||
contact:
|
||||
email: serhii@redoc.ly
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://example.org'
|
||||
version: 1.0.0
|
||||
@@ -1,6 +0,0 @@
|
||||
type: string
|
||||
description: "pet status in the store"
|
||||
enum:
|
||||
- available
|
||||
- "pending"
|
||||
- sold
|
||||
@@ -1,31 +0,0 @@
|
||||
license:
|
||||
name: ad
|
||||
url: asdasda.com
|
||||
schemas:
|
||||
Pet:
|
||||
type: "object"
|
||||
required:
|
||||
- "name"
|
||||
- "photoUrls"
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
category:
|
||||
type: string
|
||||
name:
|
||||
type: "string"
|
||||
example: "doggie"
|
||||
photoUrls:
|
||||
type: "array"
|
||||
xml:
|
||||
name: "photoUrl"
|
||||
wrapped: true
|
||||
items:
|
||||
type: "string"
|
||||
status:
|
||||
$ref: fragment.yaml
|
||||
discriminator:
|
||||
propertyName: petType
|
||||
mapping:
|
||||
dog: Dog
|
||||
@@ -1,8 +0,0 @@
|
||||
description: test desc
|
||||
parameters:
|
||||
- name: userId
|
||||
required: true
|
||||
in: path
|
||||
responses:
|
||||
'200':
|
||||
description: bla
|
||||
@@ -1,108 +0,0 @@
|
||||
tags:
|
||||
- users
|
||||
- retreive
|
||||
summary: Get a list of all users
|
||||
description: Also gives their status
|
||||
externalDocs:
|
||||
url: googleacom
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
properties:
|
||||
companyAddress:
|
||||
description: company address lines
|
||||
type: string
|
||||
companyName:
|
||||
description: Company name
|
||||
type: string
|
||||
companyNumber:
|
||||
description: official company number
|
||||
type: string
|
||||
vatNumber:
|
||||
description: VAT number to validate
|
||||
type: string
|
||||
required:
|
||||
- vatNumber
|
||||
type: object
|
||||
description: VAT number and the company details
|
||||
required: true
|
||||
parameters:
|
||||
- name: userId
|
||||
in: path
|
||||
required: true
|
||||
description: Id of a user
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
- name: val
|
||||
in: query
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../test-2.yaml#/components/schemas/user'
|
||||
example:
|
||||
name: John
|
||||
email: john@example.org
|
||||
'400':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
company:
|
||||
properties:
|
||||
address:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
country:
|
||||
type: string
|
||||
dateOfIncorporation:
|
||||
type: string
|
||||
extraData:
|
||||
type: object
|
||||
formattedAddress:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
id:
|
||||
type: string
|
||||
legalForm:
|
||||
type: string
|
||||
managingDirectors:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
registrationNumber:
|
||||
type: string
|
||||
requestTime:
|
||||
type: integer
|
||||
secretaries:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
sicNaceCodes:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- country
|
||||
- id
|
||||
- name
|
||||
- registrationNumber
|
||||
confidenceScore:
|
||||
type: number
|
||||
validationStatus:
|
||||
type: boolean
|
||||
required:
|
||||
- confidenceScore
|
||||
- validationStatus
|
||||
description: Denotes validity of checked VAT
|
||||
@@ -1,108 +0,0 @@
|
||||
tags:
|
||||
- users
|
||||
- retreive
|
||||
summary: Get a list of all users
|
||||
description: Also gives their status
|
||||
externalDocs:
|
||||
url: asdasdas
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
properties:
|
||||
companyAddress:
|
||||
description: company address lines
|
||||
type: string
|
||||
companyName:
|
||||
description: Company name
|
||||
type: string
|
||||
companyNumber:
|
||||
description: official company number
|
||||
type: string
|
||||
vatNumber:
|
||||
description: VAT number to validate
|
||||
type: string
|
||||
required:
|
||||
- vatNumber
|
||||
type: object
|
||||
description: VAT number and the company details
|
||||
required: true
|
||||
parameters:
|
||||
- name: userId
|
||||
in: path
|
||||
required: true
|
||||
description: Id of a user
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
- name: val
|
||||
in: query
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../test-2.yaml#/components/schemas/user'
|
||||
example:
|
||||
name: John
|
||||
email: john@example.org
|
||||
'400':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
company:
|
||||
properties:
|
||||
address:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
country:
|
||||
type: string
|
||||
dateOfIncorporation:
|
||||
type: string
|
||||
extraData:
|
||||
type: object
|
||||
formattedAddress:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
id:
|
||||
type: string
|
||||
legalForm:
|
||||
type: string
|
||||
managingDirectors:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
registrationNumber:
|
||||
type: string
|
||||
requestTime:
|
||||
type: integer
|
||||
secretaries:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
sicNaceCodes:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- country
|
||||
- id
|
||||
- name
|
||||
- registrationNumber
|
||||
confidenceScore:
|
||||
type: number
|
||||
validationStatus:
|
||||
type: boolean
|
||||
required:
|
||||
- confidenceScore
|
||||
- validationStatus
|
||||
description: Denotes validity of checked VAT
|
||||
@@ -1,6 +0,0 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
taitle: 123
|
||||
license:
|
||||
name: Test license
|
||||
version: 0.0.1
|
||||
@@ -1,105 +0,0 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Sample API
|
||||
x-tags:
|
||||
- api
|
||||
- documentation
|
||||
- simple
|
||||
license:
|
||||
name: MIT
|
||||
version: 0.0.1
|
||||
paths:
|
||||
/user/{userId}/{name}:
|
||||
get:
|
||||
summary: Get a list of all users
|
||||
description: Also gives their status
|
||||
parameters:
|
||||
- name: userId
|
||||
in: path
|
||||
required: true
|
||||
description: Id of a user
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
- name: val
|
||||
in: query
|
||||
schema:
|
||||
type: boolean
|
||||
enum:
|
||||
- false
|
||||
- true
|
||||
- $ref: '#/components/parameters/name'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/user'
|
||||
components:
|
||||
parameters:
|
||||
name:
|
||||
in: path
|
||||
name: name
|
||||
required: true
|
||||
schemas:
|
||||
Pet:
|
||||
type: "object"
|
||||
required:
|
||||
- "name"
|
||||
- "photoUrls"
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
category:
|
||||
type: string
|
||||
name:
|
||||
type: "string"
|
||||
example: "doggie"
|
||||
photoUrls:
|
||||
type: "array"
|
||||
xml:
|
||||
name: "photoUrl"
|
||||
wrapped: true
|
||||
items:
|
||||
type: "string"
|
||||
status:
|
||||
type: "string"
|
||||
description: "pet status in the store"
|
||||
enum:
|
||||
- "available"
|
||||
- "pending"
|
||||
- "sold"
|
||||
discriminator:
|
||||
propertyName: petType
|
||||
mapping:
|
||||
dog: Dog
|
||||
socialNetworkAccount:
|
||||
type: string
|
||||
enum:
|
||||
- a
|
||||
- blalblabla
|
||||
newUser:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
user:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/newUser'
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
socialAccount:
|
||||
$ref: '#/components/schemas/socialNetworkAccount'
|
||||
pet:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
externalDocs:
|
||||
url: https://google.com
|
||||
@@ -1,91 +0,0 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Sample API
|
||||
license:
|
||||
name: MIT
|
||||
version: 0.0.1
|
||||
paths:
|
||||
/user/{userId}:
|
||||
summary: Get a list of all users
|
||||
post:
|
||||
$ref: operations/test/operation.yaml
|
||||
get:
|
||||
$ref: operations/test/operation-2.yaml
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
type: "object"
|
||||
required:
|
||||
- "name"
|
||||
- "photoUrls"
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
category:
|
||||
type: string
|
||||
name:
|
||||
type: "string"
|
||||
example: "doggie"
|
||||
photoUrls:
|
||||
type: "array"
|
||||
xml:
|
||||
name: "photoUrl"
|
||||
wrapped: true
|
||||
items:
|
||||
type: "string"
|
||||
status:
|
||||
type: "string"
|
||||
description: "pet status in the store"
|
||||
enum:
|
||||
- "available"
|
||||
- "pending"
|
||||
- 12
|
||||
discriminator:
|
||||
propertyName: petType
|
||||
mapping:
|
||||
dog: Dog
|
||||
socialNetworkAccount:
|
||||
type: string
|
||||
enum:
|
||||
- bla
|
||||
- blalblabla
|
||||
newUser:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
user:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/newUser'
|
||||
- $ref: '#/components/schemas/newUser'
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
socialAccount:
|
||||
$ref: '#/components/schemas/socialNetworkAccount'
|
||||
pet:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
externalDocs:
|
||||
url: https://google.com
|
||||
servers:
|
||||
- url: https://{username}.gigantic-server.com:{port}/{basePath}
|
||||
description: The production API server
|
||||
variables:
|
||||
username:
|
||||
# note! no enum here means it is an open value
|
||||
default: demo
|
||||
description: this value is assigned by the service provider, in this example `gigantic-server.com`
|
||||
port:
|
||||
enum:
|
||||
- '8443'
|
||||
- '443'
|
||||
default: '8443'
|
||||
basePath:
|
||||
# open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
|
||||
default: v2
|
||||
@@ -1,5 +0,0 @@
|
||||
field: 12
|
||||
b: 12
|
||||
x-allowed: true
|
||||
child:
|
||||
a: 312
|
||||
@@ -1,192 +0,0 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Sample API
|
||||
licensasf
|
||||
/user/{userId}:
|
||||
summary: Get a list of all users
|
||||
post:
|
||||
tags:
|
||||
- users
|
||||
- retreive
|
||||
summary: Get a list of all users
|
||||
description: Also gives their status
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
properties:
|
||||
companyAddress:
|
||||
description: company address lines
|
||||
type: string
|
||||
companyName:
|
||||
description: Company name
|
||||
type: string
|
||||
companyNumber:
|
||||
description: official company number
|
||||
type: string
|
||||
vatNumber:
|
||||
description: VAT number to validate
|
||||
type: string
|
||||
required:
|
||||
- vatNumber
|
||||
type: object
|
||||
description: VAT number and the company details
|
||||
required: true
|
||||
parameters:
|
||||
- name: userId
|
||||
in: path
|
||||
required: true
|
||||
description: Id of a user
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
- name: val
|
||||
in: query
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/user'
|
||||
example:
|
||||
name: John
|
||||
email: john@example.org
|
||||
'400':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
company:
|
||||
properties:
|
||||
address:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
country:
|
||||
type: string
|
||||
dateOfIncorporation:
|
||||
type: string
|
||||
extraData:
|
||||
type: object
|
||||
formattedAddress:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
id:
|
||||
type: string
|
||||
legalForm:
|
||||
type: string
|
||||
managingDirectors:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
registrationNumber:
|
||||
type: string
|
||||
requestTime:
|
||||
type: integer
|
||||
secretaries:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
sicNaceCodes:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- country
|
||||
- id
|
||||
- name
|
||||
- registrationNumber
|
||||
confidenceScore:
|
||||
type: number
|
||||
validationStatus:
|
||||
type: boolean
|
||||
required:
|
||||
- confidenceScore
|
||||
- validationStatus
|
||||
description: Denotes validity of checked VAT
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
type: "object"
|
||||
required:
|
||||
- "name"
|
||||
- "photoUrls"
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
category:
|
||||
type: string
|
||||
name:
|
||||
type: "string"
|
||||
example: "doggie"
|
||||
photoUrls:
|
||||
type: "array"
|
||||
xml:
|
||||
name: "photoUrl"
|
||||
wrapped: true
|
||||
items:
|
||||
type: "string"
|
||||
status:
|
||||
type: "string"
|
||||
description: "pet status in the store"
|
||||
enum:
|
||||
- "available"
|
||||
- "pending"
|
||||
- "sold"
|
||||
discriminator:
|
||||
propertyName: petType
|
||||
mapping:
|
||||
dog: Dog
|
||||
socialNetworkAccount:
|
||||
type: string
|
||||
enum:
|
||||
- bla
|
||||
- blalblabla
|
||||
newUser:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
user:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/newUser'
|
||||
- $ref: '#/components/schemas/newUser'
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
socialAccount:
|
||||
$ref: '#/components/schemas/socialNetworkAccount'
|
||||
pet:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
externalDocs:
|
||||
url: https://google.com
|
||||
servers:
|
||||
- url: https://{username}.gigantic-server.com:{port}/{basePath}
|
||||
description: The production API server
|
||||
variables:
|
||||
username:
|
||||
# note! no enum here means it is an open value
|
||||
default: demo
|
||||
description: this value is assigned by the service provider, in this example `gigantic-server.com`
|
||||
port:
|
||||
enum:
|
||||
- '8443'
|
||||
- '443'
|
||||
default: '8443'
|
||||
basePath:
|
||||
# open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
|
||||
default: v2
|
||||
@@ -1,105 +0,0 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Sample API
|
||||
x-tags:
|
||||
- api
|
||||
- documentation
|
||||
- simple
|
||||
license:
|
||||
name: MIT
|
||||
version: 0.0.1
|
||||
paths:
|
||||
/user/{userId}/{name}:
|
||||
get:
|
||||
summary: Get a list of all users
|
||||
description: Also gives their status
|
||||
parameters:
|
||||
- name: userId
|
||||
in: path
|
||||
required: 123
|
||||
description: Id of a user
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
- name: val
|
||||
in: query
|
||||
schema:
|
||||
type: boolean
|
||||
enum:
|
||||
- false
|
||||
- true
|
||||
- $ref: '#/components/parameters/name'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/user'
|
||||
components:
|
||||
parameters:
|
||||
name:
|
||||
in: path
|
||||
name: name
|
||||
required: true
|
||||
schemas:
|
||||
Pet:
|
||||
type: "object"
|
||||
required:
|
||||
- "name"
|
||||
- "photoUrls"
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
category:
|
||||
type: string
|
||||
name:
|
||||
type: "string"
|
||||
example: "doggie"
|
||||
photoUrls:
|
||||
type: "array"
|
||||
xml:
|
||||
name: "photoUrl"
|
||||
wrapped: true
|
||||
items:
|
||||
type: "string"
|
||||
status:
|
||||
type: "string"
|
||||
description: "pet status in the store"
|
||||
enum:
|
||||
- "available"
|
||||
- "pending"
|
||||
- "sold"
|
||||
discriminator:
|
||||
propertyName: petType
|
||||
mapping:
|
||||
dog: Dog
|
||||
socialNetworkAccount:
|
||||
type: string
|
||||
enum:
|
||||
- a
|
||||
- blalblabla
|
||||
newUser:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
user:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/newUser'
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
socialAccount:
|
||||
$ref: '#/components/schemas/socialNetworkAccount'
|
||||
pet:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
externalDocs:
|
||||
url: https://google.com
|
||||
@@ -1,83 +0,0 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: nanana
|
||||
version: fafafa
|
||||
license:
|
||||
$ref: license-fragment.yaml#/license
|
||||
contact:
|
||||
name: Sergey
|
||||
email: knidarkness@gmail.com
|
||||
paths:
|
||||
/user/{userId}/{name}:
|
||||
post:
|
||||
name: bla
|
||||
$ref: 'operation-fragment.yaml#/'
|
||||
get:
|
||||
operationId: blabla2
|
||||
summary: Get a list of all users
|
||||
description: Also gives their status
|
||||
tags:
|
||||
- one
|
||||
- two
|
||||
- three: false
|
||||
parameters:
|
||||
- name: name
|
||||
in: path
|
||||
required: true
|
||||
description: Id of a user
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
- name: val
|
||||
in: query
|
||||
schema:
|
||||
type: boolean
|
||||
enum:
|
||||
- false
|
||||
- true
|
||||
# - $ref: '#/components/parameters/otherName'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contact'
|
||||
externalDocs:
|
||||
description: bla
|
||||
components:
|
||||
parameters:
|
||||
name:
|
||||
in: path
|
||||
name: nam
|
||||
required: true
|
||||
otherName:
|
||||
in: path
|
||||
name: name
|
||||
required: true
|
||||
schemas:
|
||||
contact:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
discriminator:
|
||||
propertyName: type
|
||||
contactExampleItem:
|
||||
type: object
|
||||
properties:
|
||||
userName:
|
||||
type: string
|
||||
contactPhone:
|
||||
type: object
|
||||
description: AstroPay settings object
|
||||
properties:
|
||||
type:
|
||||
type: object
|
||||
items:
|
||||
$ref: '#/components/schemas/contactExampleItem'
|
||||
example:
|
||||
$ref: '#/components/schemas/contactPhone'
|
||||
Reference in New Issue
Block a user