├── .npmignore ├── .gitignore ├── renovate.json ├── example ├── .graphqlconfig.yml ├── standalone.js ├── petstore.graphql └── petstore.json ├── .circleci └── config.yml ├── tsconfig.json ├── src └── index.ts ├── package.json ├── LICENSE ├── README.md └── yarn.lock /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | example 3 | tsconfig.json 4 | renovate.json -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | *.log 4 | dist 5 | .vscode -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "automerge": false 6 | } 7 | -------------------------------------------------------------------------------- /example/.graphqlconfig.yml: -------------------------------------------------------------------------------- 1 | projects: 2 | petstore: 3 | schemaPath: petstore.graphql 4 | extensions: 5 | openapi: 6 | definition: petstore.json -------------------------------------------------------------------------------- /example/standalone.js: -------------------------------------------------------------------------------- 1 | const { OpenApi } = require('../dist') 2 | 3 | OpenApi.init('./petstore.json', 'http://petstore.swagger.io/v2').then(binding => { 4 | binding.query.findPetsByStatus({ status: "available"}, {}, '{ id name }').then( 5 | res => console.log(res)) 6 | }) -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: circleci/node 6 | steps: 7 | - checkout 8 | - run: sudo npm install -g semantic-release@12.0.0 9 | - run: yarn install 10 | - run: yarn test 11 | - run: semantic-release 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "moduleResolution": "node", 5 | "module": "commonjs", 6 | "sourceMap": true, 7 | "noUnusedLocals": true, 8 | "rootDir": "./src", 9 | "outDir": "./dist", 10 | "lib": [ 11 | "esnext.asynciterable", "es2016", "dom" 12 | ] 13 | }, 14 | "exclude": ["node_modules", "dist", "example"] 15 | } 16 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import * as build from '@kbrandwijk/swagger-to-graphql'; 2 | import { Binding } from 'graphql-binding'; 3 | import { QueryMap, SubscriptionMap } from 'graphql-binding/dist/types' 4 | 5 | export class OpenApi { 6 | static async init(openapi: string, endpoint: Function | string = null) { 7 | const schema = await build(openapi, endpoint) 8 | return new Binding({ schema, fragmentReplacements: {}}) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "graphql-binding-openapi", 3 | "version": "0.0.0-semantic-release", 4 | "main": "dist/index.js", 5 | "typings": "./dist/index.d.ts", 6 | "license": "MIT", 7 | "scripts": { 8 | "prepare": "npm run build", 9 | "build": "rm -rf dist && tsc -d", 10 | "test": "echo No tests yet" 11 | }, 12 | "dependencies": { 13 | "@kbrandwijk/swagger-to-graphql": "2.4.3", 14 | "graphql-binding": "1.2.3" 15 | }, 16 | "devDependencies": { 17 | "@types/node": "9.4.6", 18 | "graphql": "0.13.1", 19 | "typescript": "2.7.2" 20 | }, 21 | "peerDependencies": { 22 | "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0" 23 | }, 24 | "repository": { 25 | "type": "git", 26 | "url": "https://github.com/graphql-binding/graphql-binding-openapi.git" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Kim Brandwijk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GraphQL Binding for Swagger/OpenAPI 2 | 3 | # Deprecation Notices! 4 | 5 | In the last few months, since [the transition of many libraries](https://www.prisma.io/blog/the-guild-takes-over-oss-libraries-vvluy2i4uevs) under [The Guild](http://the-guild.dev)'s leadership, We've reviewed and released many improvements and versions to [graphql-cli](https://github.com/Urigo/graphql-cli), [graphql-config](https://github.com/kamilkisiela/graphql-config) and [graphql-import](https://github.com/ardatan/graphql-import). 6 | 7 | We've reviewed `graphql-binding`, had many meetings with current users and engaged the community also through the [roadmap issue](https://github.com/dotansimha/graphql-binding/issues/325). 8 | 9 | What we've found is that the new [GraphQL Mesh](https://the-guild.dev/blog/graphql-mesh) library is covering not only all the current capabilities of GraphQL Binding, but also the future ideas that were introduced in the [original GraphQL Binding blog post](https://github.com/prisma-archive/prisma-blog-archive/blob/master/2018-01-12-reusing-and-composing-graphql-apis-with-graphql-bindings.mdx) and haven't come to life yet. 10 | 11 | And the best thing - [GraphQL Mesh](https://the-guild.dev/blog/graphql-mesh) gives you all those capabilities, even if your source is not a GraphQL service at all! 12 | it can be GraphQL, OpenAPI/Swagger, gRPC, SQL or any other source! 13 | And of course you can even merge all those sources into a single SDK. 14 | 15 | Just like GraphQL Binding, you get a fully typed SDK (thanks to the protocols SDKs and the [GraphQL Code Generator](https://github.com/dotansimha/graphql-code-generator)), but from any source, and that SDK can run anywhere, as a connector or as a full blown gateway. 16 | And you can share your own "Mesh Modules" (which you would probably call "your own binding") and our community already created many of those! 17 | Also, we decided to simply expose regular GraphQL, so you can choose how to consume it using all the awesome [fluent client SDKs out there](https://hasura.io/blog/fluent-graphql-clients-how-to-write-queries-like-a-boss/). 18 | 19 | If you think that we've missed anything from GraphQL Binding that is not supported in a better way in GraphQL Mesh, please let us know! 20 | 21 | 22 | 23 | 24 | Embed any Swagger/OpenAPI endpoint as GraphQL API into your server application. 25 | 26 | Both yaml and json specifications are supported. 27 | 28 | ## Install 29 | 30 | ```sh 31 | yarn add graphql-binding-openapi 32 | ``` 33 | 34 | ## How it works 35 | 36 | A service endpoint that uses the Swagger/OpenAPI specification contains a definition file (in either JSON or YAML format). This definition file has the following structure: 37 | ```json 38 | { 39 | "swagger": "2.0", 40 | "info": { }, 41 | "host": "petstore.swagger.io", 42 | "basePath": "/v2", 43 | "tags": [ ], 44 | "schemes": [ "http" ], 45 | "paths": { }, 46 | "securityDefinitions": {}, 47 | "definitions": { }, 48 | "externalDocs": { } 49 | } 50 | ``` 51 | An example for the petstore endpoint can be found [here](./example/petstore.json). 52 | 53 | This endpoint definition is transformed into a GraphQL schema, with all the paths from the endpoint translated into queries and mutations. The query and mutation names are based on the unique `operationName` found in the definition for each path. This schema looks like this: 54 | ```graphql 55 | type Query { 56 | # GET /pet/findPetsByStatus 57 | findPetsByStatus(status: [String]): [findPetsByStatus_items] 58 | 59 | # GET /pet/findPetsByTags 60 | findPetsByTags(tags: [String]): [findPetsByTags_items] 61 | 62 | # GET /pet/{petId} 63 | getPetById(petId: String): getPetById 64 | 65 | # other queries 66 | } 67 | 68 | type Mutation { 69 | # POST /pet 70 | addPet(body: param_addPet_body): addPet 71 | 72 | # PUT /pet 73 | updatePet(body: param_updatePet_body): updatePet 74 | 75 | # PUT /pet/{petId} 76 | updatePetWithForm(petId: String, name: String, status: String): updatePetWithForm 77 | 78 | # DELETE /pet/{petId} 79 | deletePet(api_key: String, petId: String): deletePet 80 | 81 | # other mutations 82 | } 83 | ``` 84 | The full schema for the petstore endpoint can be found [here](./petstore.graphql). 85 | 86 | The remote executable GraphQL schema (containing all the resolvers for querying the original endpoint) is exposed as a binding by `graphql-binding-openapi`, making each query and mutation available as a method on the binding class, for example: 87 | ```js 88 | petstore.query.findPetsByStatus({ status: "available" }) 89 | petstore.mutation.addPet({ /* mutation arguments */ }) 90 | ``` 91 | 92 | ## Example 93 | 94 | ### Standalone 95 | See [example directory](example) for a standalone example. 96 | 97 | ### With `graphql-yoga` 98 | ```js 99 | const { OpenApi } = require('graphql-binding-openapi') 100 | const { GraphQLServer } = require('graphql-yoga') 101 | 102 | const resolvers = { 103 | Query: { 104 | findAvailablePets: async (parent, args, context, info) => { 105 | return context.petstore.query.findPetsByStatus({ status: "available" }, context, info) 106 | } 107 | } 108 | } 109 | 110 | const server = new GraphQLServer({ 111 | resolvers, 112 | typeDefs, 113 | context: async req => { 114 | ...req, 115 | petstore: await OpenApi.init('./petstore.json', 'http://petstore.swagger.io/v2') 116 | } 117 | }) 118 | 119 | server.start(() => console.log('Server running on http://localhost:4000')) 120 | ``` 121 | 122 | ## graphql-config support 123 | 124 | OpenAPI bindings are supported in `graphql-config` using its extensions model. OpenAPI bindings can be added to the configuration like this: 125 | ```yaml 126 | projects: 127 | petstore: 128 | schemaPath: src/generated/petstore.graphql 129 | extensions: 130 | openapi: 131 | definition: petstore.json 132 | ``` 133 | This will enable running `graphql get-schema` to output the generated schema from the definition to the defined schemaPath. 134 | 135 | ## Static bindings 136 | Static binding support coming soon. 137 | 138 | -------------------------------------------------------------------------------- /example/petstore.graphql: -------------------------------------------------------------------------------- 1 | # source: 2 | # timestamp: Mon Jan 29 2018 16:16:30 GMT+0100 (W. Europe Standard Time) 3 | 4 | type addPet { 5 | """default field""" 6 | empty: String 7 | } 8 | 9 | type createUser { 10 | """default field""" 11 | empty: String 12 | } 13 | 14 | type createUsersWithArrayInput { 15 | """default field""" 16 | empty: String 17 | } 18 | 19 | type createUsersWithListInput { 20 | """default field""" 21 | empty: String 22 | } 23 | 24 | type deleteOrder { 25 | """default field""" 26 | empty: String 27 | } 28 | 29 | type deletePet { 30 | """default field""" 31 | empty: String 32 | } 33 | 34 | type deleteUser { 35 | """default field""" 36 | empty: String 37 | } 38 | 39 | type findPetsByStatus_items { 40 | id: String 41 | category: findPetsByStatus_items_category 42 | name: String 43 | photoUrls: [String] 44 | tags: [findPetsByStatus_items_tags_items] 45 | 46 | """pet status in the store""" 47 | status: String 48 | } 49 | 50 | type findPetsByStatus_items_category { 51 | id: String 52 | name: String 53 | } 54 | 55 | type findPetsByStatus_items_tags_items { 56 | id: String 57 | name: String 58 | } 59 | 60 | type findPetsByTags_items { 61 | id: String 62 | category: findPetsByTags_items_category 63 | name: String 64 | photoUrls: [String] 65 | tags: [findPetsByTags_items_tags_items] 66 | 67 | """pet status in the store""" 68 | status: String 69 | } 70 | 71 | type findPetsByTags_items_category { 72 | id: String 73 | name: String 74 | } 75 | 76 | type findPetsByTags_items_tags_items { 77 | id: String 78 | name: String 79 | } 80 | 81 | type getInventory { 82 | """default field""" 83 | empty: String 84 | } 85 | 86 | type getOrderById { 87 | id: String 88 | petId: String 89 | quantity: Int 90 | shipDate: String 91 | 92 | """Order Status""" 93 | status: String 94 | complete: Boolean 95 | } 96 | 97 | type getPetById { 98 | id: String 99 | category: getPetById_category 100 | name: String 101 | photoUrls: [String] 102 | tags: [getPetById_tags_items] 103 | 104 | """pet status in the store""" 105 | status: String 106 | } 107 | 108 | type getPetById_category { 109 | id: String 110 | name: String 111 | } 112 | 113 | type getPetById_tags_items { 114 | id: String 115 | name: String 116 | } 117 | 118 | type getUserByName { 119 | id: String 120 | username: String 121 | firstName: String 122 | lastName: String 123 | email: String 124 | password: String 125 | phone: String 126 | 127 | """User Status""" 128 | userStatus: Int 129 | } 130 | 131 | type loginUser { 132 | """default field""" 133 | empty: String 134 | } 135 | 136 | type logoutUser { 137 | """default field""" 138 | empty: String 139 | } 140 | 141 | type Mutation { 142 | addPet(body: param_addPet_body): addPet 143 | updatePet(body: param_updatePet_body): updatePet 144 | updatePetWithForm(petId: String, name: String, status: String): updatePetWithForm 145 | deletePet(api_key: String, petId: String): deletePet 146 | placeOrder(body: param_placeOrder_body): placeOrder 147 | 148 | """ 149 | For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors 150 | """ 151 | deleteOrder(orderId: String): deleteOrder 152 | 153 | """This can only be done by the logged in user.""" 154 | createUser(body: param_createUser_body): createUser 155 | createUsersWithArrayInput(body: param_createUsersWithArrayInput_body): createUsersWithArrayInput 156 | createUsersWithListInput(body: param_createUsersWithListInput_body): createUsersWithListInput 157 | 158 | """This can only be done by the logged in user.""" 159 | updateUser(username: String, body: param_updateUser_body): updateUser 160 | 161 | """This can only be done by the logged in user.""" 162 | deleteUser(username: String): deleteUser 163 | } 164 | 165 | """Pet object that needs to be added to the store""" 166 | input param_addPet_body { 167 | """default field""" 168 | empty: String 169 | } 170 | 171 | """Created user object""" 172 | input param_createUser_body { 173 | """default field""" 174 | empty: String 175 | } 176 | 177 | """List of user object""" 178 | input param_createUsersWithArrayInput_body { 179 | """default field""" 180 | empty: String 181 | } 182 | 183 | """List of user object""" 184 | input param_createUsersWithListInput_body { 185 | """default field""" 186 | empty: String 187 | } 188 | 189 | """order placed for purchasing the pet""" 190 | input param_placeOrder_body { 191 | """default field""" 192 | empty: String 193 | } 194 | 195 | """Pet object that needs to be added to the store""" 196 | input param_updatePet_body { 197 | """default field""" 198 | empty: String 199 | } 200 | 201 | """Updated user object""" 202 | input param_updateUser_body { 203 | """default field""" 204 | empty: String 205 | } 206 | 207 | type placeOrder { 208 | id: String 209 | petId: String 210 | quantity: Int 211 | shipDate: String 212 | 213 | """Order Status""" 214 | status: String 215 | complete: Boolean 216 | } 217 | 218 | type Query { 219 | """Multiple status values can be provided with comma separated strings""" 220 | findPetsByStatus(status: [String]): [findPetsByStatus_items] 221 | 222 | """ 223 | Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. 224 | """ 225 | findPetsByTags(tags: [String]): [findPetsByTags_items] 226 | 227 | """Returns a single pet""" 228 | getPetById(petId: String): getPetById 229 | 230 | """Returns a map of status codes to quantities""" 231 | getInventory: getInventory 232 | 233 | """ 234 | For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions 235 | """ 236 | getOrderById(orderId: String): getOrderById 237 | loginUser(username: String, password: String): loginUser 238 | logoutUser: logoutUser 239 | getUserByName(username: String): getUserByName 240 | } 241 | 242 | type updatePet { 243 | """default field""" 244 | empty: String 245 | } 246 | 247 | type updatePetWithForm { 248 | """default field""" 249 | empty: String 250 | } 251 | 252 | type updateUser { 253 | """default field""" 254 | empty: String 255 | } 256 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@kbrandwijk/swagger-to-graphql@2.4.3": 6 | version "2.4.3" 7 | resolved "https://registry.yarnpkg.com/@kbrandwijk/swagger-to-graphql/-/swagger-to-graphql-2.4.3.tgz#7c0fb2410eb0b6b9cc81fad28cc20f9386153cf1" 8 | dependencies: 9 | babel-runtime "^6.25.0" 10 | isomorphic-fetch "^2.2.1" 11 | js-yaml "^3.8.4" 12 | json-schema-ref-parser "^3.1.2" 13 | lodash "^4.16.4" 14 | node-request-by-swagger "^1.0.6" 15 | request "^2.75.0" 16 | request-promise "^4.1.1" 17 | yargs "^8.0.2" 18 | 19 | "@types/node@9.4.6", "@types/node@^9.4.6": 20 | version "9.4.6" 21 | resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e" 22 | 23 | ajv@^5.1.0: 24 | version "5.5.2" 25 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" 26 | dependencies: 27 | co "^4.6.0" 28 | fast-deep-equal "^1.0.0" 29 | fast-json-stable-stringify "^2.0.0" 30 | json-schema-traverse "^0.3.0" 31 | 32 | ansi-regex@^2.0.0: 33 | version "2.1.1" 34 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 35 | 36 | ansi-regex@^3.0.0: 37 | version "3.0.0" 38 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 39 | 40 | apollo-link@^1.1.0: 41 | version "1.2.1" 42 | resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.1.tgz#c120b16059f9bd93401b9f72b94d2f80f3f305d2" 43 | dependencies: 44 | "@types/node" "^9.4.6" 45 | apollo-utilities "^1.0.0" 46 | zen-observable-ts "^0.8.6" 47 | 48 | apollo-utilities@^1.0.0, apollo-utilities@^1.0.1: 49 | version "1.0.8" 50 | resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.8.tgz#74d797d38953d2ba35e16f880326e2abcbc8b016" 51 | 52 | argparse@^1.0.7: 53 | version "1.0.10" 54 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 55 | dependencies: 56 | sprintf-js "~1.0.2" 57 | 58 | asn1@~0.2.3: 59 | version "0.2.3" 60 | resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" 61 | 62 | assert-plus@1.0.0, assert-plus@^1.0.0: 63 | version "1.0.0" 64 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" 65 | 66 | asynckit@^0.4.0: 67 | version "0.4.0" 68 | resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" 69 | 70 | aws-sign2@~0.7.0: 71 | version "0.7.0" 72 | resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" 73 | 74 | aws4@^1.6.0: 75 | version "1.6.0" 76 | resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" 77 | 78 | babel-runtime@^6.25.0: 79 | version "6.26.0" 80 | resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" 81 | dependencies: 82 | core-js "^2.4.0" 83 | regenerator-runtime "^0.11.0" 84 | 85 | bcrypt-pbkdf@^1.0.0: 86 | version "1.0.1" 87 | resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" 88 | dependencies: 89 | tweetnacl "^0.14.3" 90 | 91 | bluebird@^3.5.0: 92 | version "3.5.1" 93 | resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" 94 | 95 | boom@4.x.x: 96 | version "4.3.1" 97 | resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" 98 | dependencies: 99 | hoek "4.x.x" 100 | 101 | boom@5.x.x: 102 | version "5.2.0" 103 | resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" 104 | dependencies: 105 | hoek "4.x.x" 106 | 107 | builtin-modules@^1.0.0: 108 | version "1.1.1" 109 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 110 | 111 | call-me-maybe@^1.0.1: 112 | version "1.0.1" 113 | resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" 114 | 115 | camelcase@^4.1.0: 116 | version "4.1.0" 117 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" 118 | 119 | caseless@~0.12.0: 120 | version "0.12.0" 121 | resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" 122 | 123 | cliui@^3.2.0: 124 | version "3.2.0" 125 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" 126 | dependencies: 127 | string-width "^1.0.1" 128 | strip-ansi "^3.0.1" 129 | wrap-ansi "^2.0.0" 130 | 131 | co@^4.6.0: 132 | version "4.6.0" 133 | resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 134 | 135 | code-point-at@^1.0.0: 136 | version "1.1.0" 137 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 138 | 139 | combined-stream@1.0.6, combined-stream@~1.0.5: 140 | version "1.0.6" 141 | resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" 142 | dependencies: 143 | delayed-stream "~1.0.0" 144 | 145 | commander@^2.7.1: 146 | version "2.14.1" 147 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" 148 | 149 | core-js@^2.4.0: 150 | version "2.5.3" 151 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" 152 | 153 | core-util-is@1.0.2: 154 | version "1.0.2" 155 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 156 | 157 | cross-spawn@^5.0.1: 158 | version "5.1.0" 159 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" 160 | dependencies: 161 | lru-cache "^4.0.1" 162 | shebang-command "^1.2.0" 163 | which "^1.2.9" 164 | 165 | cryptiles@3.x.x: 166 | version "3.1.2" 167 | resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" 168 | dependencies: 169 | boom "5.x.x" 170 | 171 | dashdash@^1.12.0: 172 | version "1.14.1" 173 | resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" 174 | dependencies: 175 | assert-plus "^1.0.0" 176 | 177 | debug@^3.0.0: 178 | version "3.1.0" 179 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" 180 | dependencies: 181 | ms "2.0.0" 182 | 183 | decamelize@^1.1.1: 184 | version "1.2.0" 185 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 186 | 187 | delayed-stream@~1.0.0: 188 | version "1.0.0" 189 | resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 190 | 191 | deprecated-decorator@^0.1.6: 192 | version "0.1.6" 193 | resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37" 194 | 195 | ecc-jsbn@~0.1.1: 196 | version "0.1.1" 197 | resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" 198 | dependencies: 199 | jsbn "~0.1.0" 200 | 201 | encoding@^0.1.11: 202 | version "0.1.12" 203 | resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" 204 | dependencies: 205 | iconv-lite "~0.4.13" 206 | 207 | error-ex@^1.2.0: 208 | version "1.3.1" 209 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" 210 | dependencies: 211 | is-arrayish "^0.2.1" 212 | 213 | es6-promise@^4.1.1: 214 | version "4.2.4" 215 | resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" 216 | 217 | esprima@^4.0.0: 218 | version "4.0.0" 219 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" 220 | 221 | execa@^0.7.0: 222 | version "0.7.0" 223 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" 224 | dependencies: 225 | cross-spawn "^5.0.1" 226 | get-stream "^3.0.0" 227 | is-stream "^1.1.0" 228 | npm-run-path "^2.0.0" 229 | p-finally "^1.0.0" 230 | signal-exit "^3.0.0" 231 | strip-eof "^1.0.0" 232 | 233 | extend@~3.0.1: 234 | version "3.0.1" 235 | resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" 236 | 237 | extsprintf@1.3.0: 238 | version "1.3.0" 239 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" 240 | 241 | extsprintf@^1.2.0: 242 | version "1.4.0" 243 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" 244 | 245 | fast-deep-equal@^1.0.0: 246 | version "1.0.0" 247 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" 248 | 249 | fast-json-stable-stringify@^2.0.0: 250 | version "2.0.0" 251 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" 252 | 253 | find-up@^2.0.0: 254 | version "2.1.0" 255 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" 256 | dependencies: 257 | locate-path "^2.0.0" 258 | 259 | forever-agent@~0.6.1: 260 | version "0.6.1" 261 | resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" 262 | 263 | form-data@~2.3.1: 264 | version "2.3.2" 265 | resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" 266 | dependencies: 267 | asynckit "^0.4.0" 268 | combined-stream "1.0.6" 269 | mime-types "^2.1.12" 270 | 271 | format-util@^1.0.3: 272 | version "1.0.3" 273 | resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.3.tgz#032dca4a116262a12c43f4c3ec8566416c5b2d95" 274 | 275 | get-caller-file@^1.0.1: 276 | version "1.0.2" 277 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" 278 | 279 | get-stream@^3.0.0: 280 | version "3.0.0" 281 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" 282 | 283 | getpass@^0.1.1: 284 | version "0.1.7" 285 | resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" 286 | dependencies: 287 | assert-plus "^1.0.0" 288 | 289 | graceful-fs@^4.1.2: 290 | version "4.1.11" 291 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 292 | 293 | graphql-binding@1.2.3: 294 | version "1.2.3" 295 | resolved "https://registry.yarnpkg.com/graphql-binding/-/graphql-binding-1.2.3.tgz#36c90649e652b59cf44f89e997ad96767cff6cb8" 296 | dependencies: 297 | graphql-tools "2.21.0" 298 | iterall "1.2.1" 299 | 300 | graphql-tools@2.21.0: 301 | version "2.21.0" 302 | resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-2.21.0.tgz#c0d0fbda6f40a87c8d267a2989ade2ae8b9a288e" 303 | dependencies: 304 | apollo-link "^1.1.0" 305 | apollo-utilities "^1.0.1" 306 | deprecated-decorator "^0.1.6" 307 | iterall "^1.1.3" 308 | uuid "^3.1.0" 309 | 310 | graphql@0.13.1: 311 | version "0.13.1" 312 | resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.13.1.tgz#9b3db3d8e40d1827e4172404bfdd2e4e17a58b55" 313 | dependencies: 314 | iterall "^1.2.0" 315 | 316 | har-schema@^2.0.0: 317 | version "2.0.0" 318 | resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" 319 | 320 | har-validator@~5.0.3: 321 | version "5.0.3" 322 | resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" 323 | dependencies: 324 | ajv "^5.1.0" 325 | har-schema "^2.0.0" 326 | 327 | hawk@~6.0.2: 328 | version "6.0.2" 329 | resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" 330 | dependencies: 331 | boom "4.x.x" 332 | cryptiles "3.x.x" 333 | hoek "4.x.x" 334 | sntp "2.x.x" 335 | 336 | hoek@4.x.x: 337 | version "4.2.1" 338 | resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" 339 | 340 | hosted-git-info@^2.1.4: 341 | version "2.5.0" 342 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" 343 | 344 | http-signature@~1.2.0: 345 | version "1.2.0" 346 | resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" 347 | dependencies: 348 | assert-plus "^1.0.0" 349 | jsprim "^1.2.2" 350 | sshpk "^1.7.0" 351 | 352 | iconv-lite@~0.4.13: 353 | version "0.4.19" 354 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" 355 | 356 | invert-kv@^1.0.0: 357 | version "1.0.0" 358 | resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" 359 | 360 | is-arrayish@^0.2.1: 361 | version "0.2.1" 362 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 363 | 364 | is-builtin-module@^1.0.0: 365 | version "1.0.0" 366 | resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" 367 | dependencies: 368 | builtin-modules "^1.0.0" 369 | 370 | is-fullwidth-code-point@^1.0.0: 371 | version "1.0.0" 372 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 373 | dependencies: 374 | number-is-nan "^1.0.0" 375 | 376 | is-fullwidth-code-point@^2.0.0: 377 | version "2.0.0" 378 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 379 | 380 | is-stream@^1.0.1, is-stream@^1.1.0: 381 | version "1.1.0" 382 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 383 | 384 | is-typedarray@~1.0.0: 385 | version "1.0.0" 386 | resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 387 | 388 | isexe@^2.0.0: 389 | version "2.0.0" 390 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 391 | 392 | isomorphic-fetch@^2.2.1: 393 | version "2.2.1" 394 | resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" 395 | dependencies: 396 | node-fetch "^1.0.1" 397 | whatwg-fetch ">=0.10.0" 398 | 399 | isstream@~0.1.2: 400 | version "0.1.2" 401 | resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" 402 | 403 | iterall@1.2.1, iterall@^1.1.3, iterall@^1.2.0: 404 | version "1.2.1" 405 | resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.1.tgz#59a347ae8001d2d4bc546b8487ca755d61849965" 406 | 407 | js-yaml@^3.8.4, js-yaml@^3.9.1: 408 | version "3.10.0" 409 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" 410 | dependencies: 411 | argparse "^1.0.7" 412 | esprima "^4.0.0" 413 | 414 | jsbn@~0.1.0: 415 | version "0.1.1" 416 | resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" 417 | 418 | json-schema-ref-parser@^3.1.2: 419 | version "3.3.1" 420 | resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-3.3.1.tgz#86e751b8099357bf601a7cfe42d10123ee906a32" 421 | dependencies: 422 | call-me-maybe "^1.0.1" 423 | debug "^3.0.0" 424 | es6-promise "^4.1.1" 425 | js-yaml "^3.9.1" 426 | ono "^4.0.2" 427 | z-schema "^3.18.2" 428 | 429 | json-schema-traverse@^0.3.0: 430 | version "0.3.1" 431 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" 432 | 433 | json-schema@0.2.3: 434 | version "0.2.3" 435 | resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" 436 | 437 | json-stringify-safe@~5.0.1: 438 | version "5.0.1" 439 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 440 | 441 | jsprim@^1.2.2: 442 | version "1.4.1" 443 | resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" 444 | dependencies: 445 | assert-plus "1.0.0" 446 | extsprintf "1.3.0" 447 | json-schema "0.2.3" 448 | verror "1.10.0" 449 | 450 | lcid@^1.0.0: 451 | version "1.0.0" 452 | resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" 453 | dependencies: 454 | invert-kv "^1.0.0" 455 | 456 | load-json-file@^2.0.0: 457 | version "2.0.0" 458 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" 459 | dependencies: 460 | graceful-fs "^4.1.2" 461 | parse-json "^2.2.0" 462 | pify "^2.0.0" 463 | strip-bom "^3.0.0" 464 | 465 | locate-path@^2.0.0: 466 | version "2.0.0" 467 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" 468 | dependencies: 469 | p-locate "^2.0.0" 470 | path-exists "^3.0.0" 471 | 472 | lodash.get@^4.0.0: 473 | version "4.4.2" 474 | resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" 475 | 476 | lodash.isequal@^4.0.0: 477 | version "4.5.0" 478 | resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" 479 | 480 | lodash@^4.13.1, lodash@^4.16.4: 481 | version "4.17.5" 482 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" 483 | 484 | lru-cache@^4.0.1: 485 | version "4.1.1" 486 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" 487 | dependencies: 488 | pseudomap "^1.0.2" 489 | yallist "^2.1.2" 490 | 491 | mem@^1.1.0: 492 | version "1.1.0" 493 | resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" 494 | dependencies: 495 | mimic-fn "^1.0.0" 496 | 497 | mime-db@~1.33.0: 498 | version "1.33.0" 499 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" 500 | 501 | mime-types@^2.1.12, mime-types@~2.1.17: 502 | version "2.1.18" 503 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" 504 | dependencies: 505 | mime-db "~1.33.0" 506 | 507 | mimic-fn@^1.0.0: 508 | version "1.2.0" 509 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" 510 | 511 | ms@2.0.0: 512 | version "2.0.0" 513 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 514 | 515 | node-fetch@^1.0.1: 516 | version "1.7.3" 517 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" 518 | dependencies: 519 | encoding "^0.1.11" 520 | is-stream "^1.0.1" 521 | 522 | node-request-by-swagger@^1.0.6: 523 | version "1.0.6" 524 | resolved "https://registry.yarnpkg.com/node-request-by-swagger/-/node-request-by-swagger-1.0.6.tgz#3129510e33232e4d37be4cce94c704670bc5b135" 525 | 526 | normalize-package-data@^2.3.2: 527 | version "2.4.0" 528 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" 529 | dependencies: 530 | hosted-git-info "^2.1.4" 531 | is-builtin-module "^1.0.0" 532 | semver "2 || 3 || 4 || 5" 533 | validate-npm-package-license "^3.0.1" 534 | 535 | npm-run-path@^2.0.0: 536 | version "2.0.2" 537 | resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" 538 | dependencies: 539 | path-key "^2.0.0" 540 | 541 | number-is-nan@^1.0.0: 542 | version "1.0.1" 543 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 544 | 545 | oauth-sign@~0.8.2: 546 | version "0.8.2" 547 | resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" 548 | 549 | ono@^4.0.2: 550 | version "4.0.3" 551 | resolved "https://registry.yarnpkg.com/ono/-/ono-4.0.3.tgz#b36050f71b02841bfb59f368deab8b07375e2219" 552 | dependencies: 553 | format-util "^1.0.3" 554 | 555 | os-locale@^2.0.0: 556 | version "2.1.0" 557 | resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" 558 | dependencies: 559 | execa "^0.7.0" 560 | lcid "^1.0.0" 561 | mem "^1.1.0" 562 | 563 | p-finally@^1.0.0: 564 | version "1.0.0" 565 | resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" 566 | 567 | p-limit@^1.1.0: 568 | version "1.2.0" 569 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" 570 | dependencies: 571 | p-try "^1.0.0" 572 | 573 | p-locate@^2.0.0: 574 | version "2.0.0" 575 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" 576 | dependencies: 577 | p-limit "^1.1.0" 578 | 579 | p-try@^1.0.0: 580 | version "1.0.0" 581 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" 582 | 583 | parse-json@^2.2.0: 584 | version "2.2.0" 585 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 586 | dependencies: 587 | error-ex "^1.2.0" 588 | 589 | path-exists@^3.0.0: 590 | version "3.0.0" 591 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 592 | 593 | path-key@^2.0.0: 594 | version "2.0.1" 595 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 596 | 597 | path-type@^2.0.0: 598 | version "2.0.0" 599 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" 600 | dependencies: 601 | pify "^2.0.0" 602 | 603 | performance-now@^2.1.0: 604 | version "2.1.0" 605 | resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" 606 | 607 | pify@^2.0.0: 608 | version "2.3.0" 609 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 610 | 611 | pseudomap@^1.0.2: 612 | version "1.0.2" 613 | resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" 614 | 615 | punycode@^1.4.1: 616 | version "1.4.1" 617 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 618 | 619 | qs@~6.5.1: 620 | version "6.5.1" 621 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" 622 | 623 | read-pkg-up@^2.0.0: 624 | version "2.0.0" 625 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" 626 | dependencies: 627 | find-up "^2.0.0" 628 | read-pkg "^2.0.0" 629 | 630 | read-pkg@^2.0.0: 631 | version "2.0.0" 632 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" 633 | dependencies: 634 | load-json-file "^2.0.0" 635 | normalize-package-data "^2.3.2" 636 | path-type "^2.0.0" 637 | 638 | regenerator-runtime@^0.11.0: 639 | version "0.11.1" 640 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" 641 | 642 | request-promise-core@1.1.1: 643 | version "1.1.1" 644 | resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" 645 | dependencies: 646 | lodash "^4.13.1" 647 | 648 | request-promise@^4.1.1: 649 | version "4.2.2" 650 | resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.2.tgz#d1ea46d654a6ee4f8ee6a4fea1018c22911904b4" 651 | dependencies: 652 | bluebird "^3.5.0" 653 | request-promise-core "1.1.1" 654 | stealthy-require "^1.1.0" 655 | tough-cookie ">=2.3.3" 656 | 657 | request@^2.75.0: 658 | version "2.83.0" 659 | resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" 660 | dependencies: 661 | aws-sign2 "~0.7.0" 662 | aws4 "^1.6.0" 663 | caseless "~0.12.0" 664 | combined-stream "~1.0.5" 665 | extend "~3.0.1" 666 | forever-agent "~0.6.1" 667 | form-data "~2.3.1" 668 | har-validator "~5.0.3" 669 | hawk "~6.0.2" 670 | http-signature "~1.2.0" 671 | is-typedarray "~1.0.0" 672 | isstream "~0.1.2" 673 | json-stringify-safe "~5.0.1" 674 | mime-types "~2.1.17" 675 | oauth-sign "~0.8.2" 676 | performance-now "^2.1.0" 677 | qs "~6.5.1" 678 | safe-buffer "^5.1.1" 679 | stringstream "~0.0.5" 680 | tough-cookie "~2.3.3" 681 | tunnel-agent "^0.6.0" 682 | uuid "^3.1.0" 683 | 684 | require-directory@^2.1.1: 685 | version "2.1.1" 686 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 687 | 688 | require-main-filename@^1.0.1: 689 | version "1.0.1" 690 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" 691 | 692 | safe-buffer@^5.0.1, safe-buffer@^5.1.1: 693 | version "5.1.1" 694 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" 695 | 696 | "semver@2 || 3 || 4 || 5": 697 | version "5.5.0" 698 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" 699 | 700 | set-blocking@^2.0.0: 701 | version "2.0.0" 702 | resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" 703 | 704 | shebang-command@^1.2.0: 705 | version "1.2.0" 706 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 707 | dependencies: 708 | shebang-regex "^1.0.0" 709 | 710 | shebang-regex@^1.0.0: 711 | version "1.0.0" 712 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 713 | 714 | signal-exit@^3.0.0: 715 | version "3.0.2" 716 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 717 | 718 | sntp@2.x.x: 719 | version "2.1.0" 720 | resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" 721 | dependencies: 722 | hoek "4.x.x" 723 | 724 | spdx-correct@~1.0.0: 725 | version "1.0.2" 726 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" 727 | dependencies: 728 | spdx-license-ids "^1.0.2" 729 | 730 | spdx-expression-parse@~1.0.0: 731 | version "1.0.4" 732 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" 733 | 734 | spdx-license-ids@^1.0.2: 735 | version "1.2.2" 736 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" 737 | 738 | sprintf-js@~1.0.2: 739 | version "1.0.3" 740 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 741 | 742 | sshpk@^1.7.0: 743 | version "1.13.1" 744 | resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" 745 | dependencies: 746 | asn1 "~0.2.3" 747 | assert-plus "^1.0.0" 748 | dashdash "^1.12.0" 749 | getpass "^0.1.1" 750 | optionalDependencies: 751 | bcrypt-pbkdf "^1.0.0" 752 | ecc-jsbn "~0.1.1" 753 | jsbn "~0.1.0" 754 | tweetnacl "~0.14.0" 755 | 756 | stealthy-require@^1.1.0: 757 | version "1.1.1" 758 | resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" 759 | 760 | string-width@^1.0.1: 761 | version "1.0.2" 762 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 763 | dependencies: 764 | code-point-at "^1.0.0" 765 | is-fullwidth-code-point "^1.0.0" 766 | strip-ansi "^3.0.0" 767 | 768 | string-width@^2.0.0: 769 | version "2.1.1" 770 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 771 | dependencies: 772 | is-fullwidth-code-point "^2.0.0" 773 | strip-ansi "^4.0.0" 774 | 775 | stringstream@~0.0.5: 776 | version "0.0.5" 777 | resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" 778 | 779 | strip-ansi@^3.0.0, strip-ansi@^3.0.1: 780 | version "3.0.1" 781 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 782 | dependencies: 783 | ansi-regex "^2.0.0" 784 | 785 | strip-ansi@^4.0.0: 786 | version "4.0.0" 787 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 788 | dependencies: 789 | ansi-regex "^3.0.0" 790 | 791 | strip-bom@^3.0.0: 792 | version "3.0.0" 793 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 794 | 795 | strip-eof@^1.0.0: 796 | version "1.0.0" 797 | resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" 798 | 799 | tough-cookie@>=2.3.3, tough-cookie@~2.3.3: 800 | version "2.3.3" 801 | resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" 802 | dependencies: 803 | punycode "^1.4.1" 804 | 805 | tunnel-agent@^0.6.0: 806 | version "0.6.0" 807 | resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" 808 | dependencies: 809 | safe-buffer "^5.0.1" 810 | 811 | tweetnacl@^0.14.3, tweetnacl@~0.14.0: 812 | version "0.14.5" 813 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" 814 | 815 | typescript@2.7.2: 816 | version "2.7.2" 817 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836" 818 | 819 | uuid@^3.1.0: 820 | version "3.2.1" 821 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" 822 | 823 | validate-npm-package-license@^3.0.1: 824 | version "3.0.1" 825 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" 826 | dependencies: 827 | spdx-correct "~1.0.0" 828 | spdx-expression-parse "~1.0.0" 829 | 830 | validator@^9.0.0: 831 | version "9.4.1" 832 | resolved "https://registry.yarnpkg.com/validator/-/validator-9.4.1.tgz#abf466d398b561cd243050112c6ff1de6cc12663" 833 | 834 | verror@1.10.0: 835 | version "1.10.0" 836 | resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" 837 | dependencies: 838 | assert-plus "^1.0.0" 839 | core-util-is "1.0.2" 840 | extsprintf "^1.2.0" 841 | 842 | whatwg-fetch@>=0.10.0: 843 | version "2.0.3" 844 | resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" 845 | 846 | which-module@^2.0.0: 847 | version "2.0.0" 848 | resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" 849 | 850 | which@^1.2.9: 851 | version "1.3.0" 852 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" 853 | dependencies: 854 | isexe "^2.0.0" 855 | 856 | wrap-ansi@^2.0.0: 857 | version "2.1.0" 858 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" 859 | dependencies: 860 | string-width "^1.0.1" 861 | strip-ansi "^3.0.1" 862 | 863 | y18n@^3.2.1: 864 | version "3.2.1" 865 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" 866 | 867 | yallist@^2.1.2: 868 | version "2.1.2" 869 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" 870 | 871 | yargs-parser@^7.0.0: 872 | version "7.0.0" 873 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" 874 | dependencies: 875 | camelcase "^4.1.0" 876 | 877 | yargs@^8.0.2: 878 | version "8.0.2" 879 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" 880 | dependencies: 881 | camelcase "^4.1.0" 882 | cliui "^3.2.0" 883 | decamelize "^1.1.1" 884 | get-caller-file "^1.0.1" 885 | os-locale "^2.0.0" 886 | read-pkg-up "^2.0.0" 887 | require-directory "^2.1.1" 888 | require-main-filename "^1.0.1" 889 | set-blocking "^2.0.0" 890 | string-width "^2.0.0" 891 | which-module "^2.0.0" 892 | y18n "^3.2.1" 893 | yargs-parser "^7.0.0" 894 | 895 | z-schema@^3.18.2: 896 | version "3.19.1" 897 | resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-3.19.1.tgz#1faa828146d9365330031e962fbd071c7c6434ac" 898 | dependencies: 899 | lodash.get "^4.0.0" 900 | lodash.isequal "^4.0.0" 901 | validator "^9.0.0" 902 | optionalDependencies: 903 | commander "^2.7.1" 904 | 905 | zen-observable-ts@^0.8.6: 906 | version "0.8.7" 907 | resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.7.tgz#69a1614e9c8dc6617bb9f4d402ef577ff183d009" 908 | dependencies: 909 | zen-observable "^0.8.6" 910 | 911 | zen-observable@^0.8.6: 912 | version "0.8.6" 913 | resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.6.tgz#e2419311497019419d7bb56d8f6a56356a607272" 914 | -------------------------------------------------------------------------------- /example/petstore.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", 5 | "version": "1.0.0", 6 | "title": "Swagger Petstore", 7 | "termsOfService": "http://swagger.io/terms/", 8 | "contact": { 9 | "email": "apiteam@swagger.io" 10 | }, 11 | "license": { 12 | "name": "Apache 2.0", 13 | "url": "http://www.apache.org/licenses/LICENSE-2.0.html" 14 | } 15 | }, 16 | "host": "petstore.swagger.io", 17 | "basePath": "/v2", 18 | "tags": [ 19 | { 20 | "name": "pet", 21 | "description": "Everything about your Pets", 22 | "externalDocs": { 23 | "description": "Find out more", 24 | "url": "http://swagger.io" 25 | } 26 | }, 27 | { 28 | "name": "store", 29 | "description": "Access to Petstore orders" 30 | }, 31 | { 32 | "name": "user", 33 | "description": "Operations about user", 34 | "externalDocs": { 35 | "description": "Find out more about our store", 36 | "url": "http://swagger.io" 37 | } 38 | } 39 | ], 40 | "schemes": [ 41 | "http" 42 | ], 43 | "paths": { 44 | "/pet": { 45 | "post": { 46 | "tags": [ 47 | "pet" 48 | ], 49 | "summary": "Add a new pet to the store", 50 | "description": "", 51 | "operationId": "addPet", 52 | "consumes": [ 53 | "application/json", 54 | "application/xml" 55 | ], 56 | "produces": [ 57 | "application/xml", 58 | "application/json" 59 | ], 60 | "parameters": [ 61 | { 62 | "in": "body", 63 | "name": "body", 64 | "description": "Pet object that needs to be added to the store", 65 | "required": true, 66 | "schema": { 67 | "$ref": "#/definitions/Pet" 68 | } 69 | } 70 | ], 71 | "responses": { 72 | "405": { 73 | "description": "Invalid input" 74 | } 75 | }, 76 | "security": [ 77 | { 78 | "petstore_auth": [ 79 | "write:pets", 80 | "read:pets" 81 | ] 82 | } 83 | ] 84 | }, 85 | "put": { 86 | "tags": [ 87 | "pet" 88 | ], 89 | "summary": "Update an existing pet", 90 | "description": "", 91 | "operationId": "updatePet", 92 | "consumes": [ 93 | "application/json", 94 | "application/xml" 95 | ], 96 | "produces": [ 97 | "application/xml", 98 | "application/json" 99 | ], 100 | "parameters": [ 101 | { 102 | "in": "body", 103 | "name": "body", 104 | "description": "Pet object that needs to be added to the store", 105 | "required": true, 106 | "schema": { 107 | "$ref": "#/definitions/Pet" 108 | } 109 | } 110 | ], 111 | "responses": { 112 | "400": { 113 | "description": "Invalid ID supplied" 114 | }, 115 | "404": { 116 | "description": "Pet not found" 117 | }, 118 | "405": { 119 | "description": "Validation exception" 120 | } 121 | }, 122 | "security": [ 123 | { 124 | "petstore_auth": [ 125 | "write:pets", 126 | "read:pets" 127 | ] 128 | } 129 | ] 130 | } 131 | }, 132 | "/pet/findByStatus": { 133 | "get": { 134 | "tags": [ 135 | "pet" 136 | ], 137 | "summary": "Finds Pets by status", 138 | "description": "Multiple status values can be provided with comma separated strings", 139 | "operationId": "findPetsByStatus", 140 | "produces": [ 141 | "application/xml", 142 | "application/json" 143 | ], 144 | "parameters": [ 145 | { 146 | "name": "status", 147 | "in": "query", 148 | "description": "Status values that need to be considered for filter", 149 | "required": true, 150 | "type": "array", 151 | "items": { 152 | "type": "string", 153 | "enum": [ 154 | "available", 155 | "pending", 156 | "sold" 157 | ], 158 | "default": "available" 159 | }, 160 | "collectionFormat": "multi" 161 | } 162 | ], 163 | "responses": { 164 | "200": { 165 | "description": "successful operation", 166 | "schema": { 167 | "type": "array", 168 | "items": { 169 | "$ref": "#/definitions/Pet" 170 | } 171 | } 172 | }, 173 | "400": { 174 | "description": "Invalid status value" 175 | } 176 | }, 177 | "security": [ 178 | { 179 | "petstore_auth": [ 180 | "write:pets", 181 | "read:pets" 182 | ] 183 | } 184 | ] 185 | } 186 | }, 187 | "/pet/findByTags": { 188 | "get": { 189 | "tags": [ 190 | "pet" 191 | ], 192 | "summary": "Finds Pets by tags", 193 | "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", 194 | "operationId": "findPetsByTags", 195 | "produces": [ 196 | "application/xml", 197 | "application/json" 198 | ], 199 | "parameters": [ 200 | { 201 | "name": "tags", 202 | "in": "query", 203 | "description": "Tags to filter by", 204 | "required": true, 205 | "type": "array", 206 | "items": { 207 | "type": "string" 208 | }, 209 | "collectionFormat": "multi" 210 | } 211 | ], 212 | "responses": { 213 | "200": { 214 | "description": "successful operation", 215 | "schema": { 216 | "type": "array", 217 | "items": { 218 | "$ref": "#/definitions/Pet" 219 | } 220 | } 221 | }, 222 | "400": { 223 | "description": "Invalid tag value" 224 | } 225 | }, 226 | "security": [ 227 | { 228 | "petstore_auth": [ 229 | "write:pets", 230 | "read:pets" 231 | ] 232 | } 233 | ], 234 | "deprecated": true 235 | } 236 | }, 237 | "/pet/{petId}": { 238 | "get": { 239 | "tags": [ 240 | "pet" 241 | ], 242 | "summary": "Find pet by ID", 243 | "description": "Returns a single pet", 244 | "operationId": "getPetById", 245 | "produces": [ 246 | "application/xml", 247 | "application/json" 248 | ], 249 | "parameters": [ 250 | { 251 | "name": "petId", 252 | "in": "path", 253 | "description": "ID of pet to return", 254 | "required": true, 255 | "type": "integer", 256 | "format": "int64" 257 | } 258 | ], 259 | "responses": { 260 | "200": { 261 | "description": "successful operation", 262 | "schema": { 263 | "$ref": "#/definitions/Pet" 264 | } 265 | }, 266 | "400": { 267 | "description": "Invalid ID supplied" 268 | }, 269 | "404": { 270 | "description": "Pet not found" 271 | } 272 | }, 273 | "security": [ 274 | { 275 | "api_key": [] 276 | } 277 | ] 278 | }, 279 | "post": { 280 | "tags": [ 281 | "pet" 282 | ], 283 | "summary": "Updates a pet in the store with form data", 284 | "description": "", 285 | "operationId": "updatePetWithForm", 286 | "consumes": [ 287 | "application/x-www-form-urlencoded" 288 | ], 289 | "produces": [ 290 | "application/xml", 291 | "application/json" 292 | ], 293 | "parameters": [ 294 | { 295 | "name": "petId", 296 | "in": "path", 297 | "description": "ID of pet that needs to be updated", 298 | "required": true, 299 | "type": "integer", 300 | "format": "int64" 301 | }, 302 | { 303 | "name": "name", 304 | "in": "formData", 305 | "description": "Updated name of the pet", 306 | "required": false, 307 | "type": "string" 308 | }, 309 | { 310 | "name": "status", 311 | "in": "formData", 312 | "description": "Updated status of the pet", 313 | "required": false, 314 | "type": "string" 315 | } 316 | ], 317 | "responses": { 318 | "405": { 319 | "description": "Invalid input" 320 | } 321 | }, 322 | "security": [ 323 | { 324 | "petstore_auth": [ 325 | "write:pets", 326 | "read:pets" 327 | ] 328 | } 329 | ] 330 | }, 331 | "delete": { 332 | "tags": [ 333 | "pet" 334 | ], 335 | "summary": "Deletes a pet", 336 | "description": "", 337 | "operationId": "deletePet", 338 | "produces": [ 339 | "application/xml", 340 | "application/json" 341 | ], 342 | "parameters": [ 343 | { 344 | "name": "api_key", 345 | "in": "header", 346 | "required": false, 347 | "type": "string" 348 | }, 349 | { 350 | "name": "petId", 351 | "in": "path", 352 | "description": "Pet id to delete", 353 | "required": true, 354 | "type": "integer", 355 | "format": "int64" 356 | } 357 | ], 358 | "responses": { 359 | "400": { 360 | "description": "Invalid ID supplied" 361 | }, 362 | "404": { 363 | "description": "Pet not found" 364 | } 365 | }, 366 | "security": [ 367 | { 368 | "petstore_auth": [ 369 | "write:pets", 370 | "read:pets" 371 | ] 372 | } 373 | ] 374 | } 375 | }, 376 | "/store/inventory": { 377 | "get": { 378 | "tags": [ 379 | "store" 380 | ], 381 | "summary": "Returns pet inventories by status", 382 | "description": "Returns a map of status codes to quantities", 383 | "operationId": "getInventory", 384 | "produces": [ 385 | "application/json" 386 | ], 387 | "parameters": [], 388 | "responses": { 389 | "200": { 390 | "description": "successful operation", 391 | "schema": { 392 | "type": "object", 393 | "additionalProperties": { 394 | "type": "integer", 395 | "format": "int32" 396 | } 397 | } 398 | } 399 | }, 400 | "security": [ 401 | { 402 | "api_key": [] 403 | } 404 | ] 405 | } 406 | }, 407 | "/store/order": { 408 | "post": { 409 | "tags": [ 410 | "store" 411 | ], 412 | "summary": "Place an order for a pet", 413 | "description": "", 414 | "operationId": "placeOrder", 415 | "produces": [ 416 | "application/xml", 417 | "application/json" 418 | ], 419 | "parameters": [ 420 | { 421 | "in": "body", 422 | "name": "body", 423 | "description": "order placed for purchasing the pet", 424 | "required": true, 425 | "schema": { 426 | "$ref": "#/definitions/Order" 427 | } 428 | } 429 | ], 430 | "responses": { 431 | "200": { 432 | "description": "successful operation", 433 | "schema": { 434 | "$ref": "#/definitions/Order" 435 | } 436 | }, 437 | "400": { 438 | "description": "Invalid Order" 439 | } 440 | } 441 | } 442 | }, 443 | "/store/order/{orderId}": { 444 | "get": { 445 | "tags": [ 446 | "store" 447 | ], 448 | "summary": "Find purchase order by ID", 449 | "description": "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions", 450 | "operationId": "getOrderById", 451 | "produces": [ 452 | "application/xml", 453 | "application/json" 454 | ], 455 | "parameters": [ 456 | { 457 | "name": "orderId", 458 | "in": "path", 459 | "description": "ID of pet that needs to be fetched", 460 | "required": true, 461 | "type": "integer", 462 | "maximum": 10, 463 | "minimum": 1, 464 | "format": "int64" 465 | } 466 | ], 467 | "responses": { 468 | "200": { 469 | "description": "successful operation", 470 | "schema": { 471 | "$ref": "#/definitions/Order" 472 | } 473 | }, 474 | "400": { 475 | "description": "Invalid ID supplied" 476 | }, 477 | "404": { 478 | "description": "Order not found" 479 | } 480 | } 481 | }, 482 | "delete": { 483 | "tags": [ 484 | "store" 485 | ], 486 | "summary": "Delete purchase order by ID", 487 | "description": "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors", 488 | "operationId": "deleteOrder", 489 | "produces": [ 490 | "application/xml", 491 | "application/json" 492 | ], 493 | "parameters": [ 494 | { 495 | "name": "orderId", 496 | "in": "path", 497 | "description": "ID of the order that needs to be deleted", 498 | "required": true, 499 | "type": "integer", 500 | "minimum": 1, 501 | "format": "int64" 502 | } 503 | ], 504 | "responses": { 505 | "400": { 506 | "description": "Invalid ID supplied" 507 | }, 508 | "404": { 509 | "description": "Order not found" 510 | } 511 | } 512 | } 513 | }, 514 | "/user": { 515 | "post": { 516 | "tags": [ 517 | "user" 518 | ], 519 | "summary": "Create user", 520 | "description": "This can only be done by the logged in user.", 521 | "operationId": "createUser", 522 | "produces": [ 523 | "application/xml", 524 | "application/json" 525 | ], 526 | "parameters": [ 527 | { 528 | "in": "body", 529 | "name": "body", 530 | "description": "Created user object", 531 | "required": true, 532 | "schema": { 533 | "$ref": "#/definitions/User" 534 | } 535 | } 536 | ], 537 | "responses": { 538 | "default": { 539 | "description": "successful operation" 540 | } 541 | } 542 | } 543 | }, 544 | "/user/createWithArray": { 545 | "post": { 546 | "tags": [ 547 | "user" 548 | ], 549 | "summary": "Creates list of users with given input array", 550 | "description": "", 551 | "operationId": "createUsersWithArrayInput", 552 | "produces": [ 553 | "application/xml", 554 | "application/json" 555 | ], 556 | "parameters": [ 557 | { 558 | "in": "body", 559 | "name": "body", 560 | "description": "List of user object", 561 | "required": true, 562 | "schema": { 563 | "type": "array", 564 | "items": { 565 | "$ref": "#/definitions/User" 566 | } 567 | } 568 | } 569 | ], 570 | "responses": { 571 | "default": { 572 | "description": "successful operation" 573 | } 574 | } 575 | } 576 | }, 577 | "/user/createWithList": { 578 | "post": { 579 | "tags": [ 580 | "user" 581 | ], 582 | "summary": "Creates list of users with given input array", 583 | "description": "", 584 | "operationId": "createUsersWithListInput", 585 | "produces": [ 586 | "application/xml", 587 | "application/json" 588 | ], 589 | "parameters": [ 590 | { 591 | "in": "body", 592 | "name": "body", 593 | "description": "List of user object", 594 | "required": true, 595 | "schema": { 596 | "type": "array", 597 | "items": { 598 | "$ref": "#/definitions/User" 599 | } 600 | } 601 | } 602 | ], 603 | "responses": { 604 | "default": { 605 | "description": "successful operation" 606 | } 607 | } 608 | } 609 | }, 610 | "/user/login": { 611 | "get": { 612 | "tags": [ 613 | "user" 614 | ], 615 | "summary": "Logs user into the system", 616 | "description": "", 617 | "operationId": "loginUser", 618 | "produces": [ 619 | "application/xml", 620 | "application/json" 621 | ], 622 | "parameters": [ 623 | { 624 | "name": "username", 625 | "in": "query", 626 | "description": "The user name for login", 627 | "required": true, 628 | "type": "string" 629 | }, 630 | { 631 | "name": "password", 632 | "in": "query", 633 | "description": "The password for login in clear text", 634 | "required": true, 635 | "type": "string" 636 | } 637 | ], 638 | "responses": { 639 | "200": { 640 | "description": "successful operation", 641 | "schema": { 642 | "type": "string" 643 | }, 644 | "headers": { 645 | "X-Rate-Limit": { 646 | "type": "integer", 647 | "format": "int32", 648 | "description": "calls per hour allowed by the user" 649 | }, 650 | "X-Expires-After": { 651 | "type": "string", 652 | "format": "date-time", 653 | "description": "date in UTC when token expires" 654 | } 655 | } 656 | }, 657 | "400": { 658 | "description": "Invalid username/password supplied" 659 | } 660 | } 661 | } 662 | }, 663 | "/user/logout": { 664 | "get": { 665 | "tags": [ 666 | "user" 667 | ], 668 | "summary": "Logs out current logged in user session", 669 | "description": "", 670 | "operationId": "logoutUser", 671 | "produces": [ 672 | "application/xml", 673 | "application/json" 674 | ], 675 | "parameters": [], 676 | "responses": { 677 | "default": { 678 | "description": "successful operation" 679 | } 680 | } 681 | } 682 | }, 683 | "/user/{username}": { 684 | "get": { 685 | "tags": [ 686 | "user" 687 | ], 688 | "summary": "Get user by user name", 689 | "description": "", 690 | "operationId": "getUserByName", 691 | "produces": [ 692 | "application/xml", 693 | "application/json" 694 | ], 695 | "parameters": [ 696 | { 697 | "name": "username", 698 | "in": "path", 699 | "description": "The name that needs to be fetched. Use user1 for testing. ", 700 | "required": true, 701 | "type": "string" 702 | } 703 | ], 704 | "responses": { 705 | "200": { 706 | "description": "successful operation", 707 | "schema": { 708 | "$ref": "#/definitions/User" 709 | } 710 | }, 711 | "400": { 712 | "description": "Invalid username supplied" 713 | }, 714 | "404": { 715 | "description": "User not found" 716 | } 717 | } 718 | }, 719 | "put": { 720 | "tags": [ 721 | "user" 722 | ], 723 | "summary": "Updated user", 724 | "description": "This can only be done by the logged in user.", 725 | "operationId": "updateUser", 726 | "produces": [ 727 | "application/xml", 728 | "application/json" 729 | ], 730 | "parameters": [ 731 | { 732 | "name": "username", 733 | "in": "path", 734 | "description": "name that need to be updated", 735 | "required": true, 736 | "type": "string" 737 | }, 738 | { 739 | "in": "body", 740 | "name": "body", 741 | "description": "Updated user object", 742 | "required": true, 743 | "schema": { 744 | "$ref": "#/definitions/User" 745 | } 746 | } 747 | ], 748 | "responses": { 749 | "400": { 750 | "description": "Invalid user supplied" 751 | }, 752 | "404": { 753 | "description": "User not found" 754 | } 755 | } 756 | }, 757 | "delete": { 758 | "tags": [ 759 | "user" 760 | ], 761 | "summary": "Delete user", 762 | "description": "This can only be done by the logged in user.", 763 | "operationId": "deleteUser", 764 | "produces": [ 765 | "application/xml", 766 | "application/json" 767 | ], 768 | "parameters": [ 769 | { 770 | "name": "username", 771 | "in": "path", 772 | "description": "The name that needs to be deleted", 773 | "required": true, 774 | "type": "string" 775 | } 776 | ], 777 | "responses": { 778 | "400": { 779 | "description": "Invalid username supplied" 780 | }, 781 | "404": { 782 | "description": "User not found" 783 | } 784 | } 785 | } 786 | } 787 | }, 788 | "securityDefinitions": { 789 | "petstore_auth": { 790 | "type": "oauth2", 791 | "authorizationUrl": "http://petstore.swagger.io/oauth/dialog", 792 | "flow": "implicit", 793 | "scopes": { 794 | "write:pets": "modify pets in your account", 795 | "read:pets": "read your pets" 796 | } 797 | }, 798 | "api_key": { 799 | "type": "apiKey", 800 | "name": "api_key", 801 | "in": "header" 802 | } 803 | }, 804 | "definitions": { 805 | "Order": { 806 | "type": "object", 807 | "properties": { 808 | "id": { 809 | "type": "integer", 810 | "format": "int64" 811 | }, 812 | "petId": { 813 | "type": "integer", 814 | "format": "int64" 815 | }, 816 | "quantity": { 817 | "type": "integer", 818 | "format": "int32" 819 | }, 820 | "shipDate": { 821 | "type": "string", 822 | "format": "date-time" 823 | }, 824 | "status": { 825 | "type": "string", 826 | "description": "Order Status", 827 | "enum": [ 828 | "placed", 829 | "approved", 830 | "delivered" 831 | ] 832 | }, 833 | "complete": { 834 | "type": "boolean", 835 | "default": false 836 | } 837 | }, 838 | "xml": { 839 | "name": "Order" 840 | } 841 | }, 842 | "Category": { 843 | "type": "object", 844 | "properties": { 845 | "id": { 846 | "type": "integer", 847 | "format": "int64" 848 | }, 849 | "name": { 850 | "type": "string" 851 | } 852 | }, 853 | "xml": { 854 | "name": "Category" 855 | } 856 | }, 857 | "User": { 858 | "type": "object", 859 | "properties": { 860 | "id": { 861 | "type": "integer", 862 | "format": "int64" 863 | }, 864 | "username": { 865 | "type": "string" 866 | }, 867 | "firstName": { 868 | "type": "string" 869 | }, 870 | "lastName": { 871 | "type": "string" 872 | }, 873 | "email": { 874 | "type": "string" 875 | }, 876 | "password": { 877 | "type": "string" 878 | }, 879 | "phone": { 880 | "type": "string" 881 | }, 882 | "userStatus": { 883 | "type": "integer", 884 | "format": "int32", 885 | "description": "User Status" 886 | } 887 | }, 888 | "xml": { 889 | "name": "User" 890 | } 891 | }, 892 | "Tag": { 893 | "type": "object", 894 | "properties": { 895 | "id": { 896 | "type": "integer", 897 | "format": "int64" 898 | }, 899 | "name": { 900 | "type": "string" 901 | } 902 | }, 903 | "xml": { 904 | "name": "Tag" 905 | } 906 | }, 907 | "Pet": { 908 | "type": "object", 909 | "required": [ 910 | "name", 911 | "photoUrls" 912 | ], 913 | "properties": { 914 | "id": { 915 | "type": "integer", 916 | "format": "int64" 917 | }, 918 | "category": { 919 | "$ref": "#/definitions/Category" 920 | }, 921 | "name": { 922 | "type": "string", 923 | "example": "doggie" 924 | }, 925 | "photoUrls": { 926 | "type": "array", 927 | "xml": { 928 | "name": "photoUrl", 929 | "wrapped": true 930 | }, 931 | "items": { 932 | "type": "string" 933 | } 934 | }, 935 | "tags": { 936 | "type": "array", 937 | "xml": { 938 | "name": "tag", 939 | "wrapped": true 940 | }, 941 | "items": { 942 | "$ref": "#/definitions/Tag" 943 | } 944 | }, 945 | "status": { 946 | "type": "string", 947 | "description": "pet status in the store", 948 | "enum": [ 949 | "available", 950 | "pending", 951 | "sold" 952 | ] 953 | } 954 | }, 955 | "xml": { 956 | "name": "Pet" 957 | } 958 | }, 959 | "ApiResponse": { 960 | "type": "object", 961 | "properties": { 962 | "code": { 963 | "type": "integer", 964 | "format": "int32" 965 | }, 966 | "type": { 967 | "type": "string" 968 | }, 969 | "message": { 970 | "type": "string" 971 | } 972 | } 973 | } 974 | }, 975 | "externalDocs": { 976 | "description": "Find out more about Swagger", 977 | "url": "http://swagger.io" 978 | } 979 | } --------------------------------------------------------------------------------