Skip to content

Commit

Permalink
fix: refactor names a bit, add service tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marbemac committed Jun 16, 2019
1 parent e8751bb commit fc2c00e
Show file tree
Hide file tree
Showing 11 changed files with 844 additions and 49 deletions.
151 changes: 151 additions & 0 deletions src/oas/__tests__/__snapshots__/service.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`oas service openapi v2 1`] = `
Object {
"contact": Object {
"email": "apiteam@swagger.io",
},
"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.",
"id": "?http-service-id?",
"license": Object {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html",
},
"name": "Swagger Petstore",
"security": Array [],
"securitySchemes": Array [
Object {
"description": undefined,
"flows": Object {
"implicit": Object {
"authorizationUrl": "https://petstore.swagger.io/oauth/dialog",
"scopes": Object {
"read:pets": "read your pets",
"write:pets": "modify pets in your account",
},
},
},
"type": "oauth2",
},
Object {
"description": undefined,
"in": "header",
"name": "api_key",
"type": "apiKey",
},
],
"servers": Array [
Object {
"description": undefined,
"name": "Swagger Petstore",
"url": "https://petstore.swagger.io/v2",
},
Object {
"description": undefined,
"name": "Swagger Petstore",
"url": "http://petstore.swagger.io/v2",
},
],
"tags": Array [
Object {
"description": "Everything about your Pets",
"externalDocs": Object {
"description": "Find out more",
"url": "http://swagger.io",
},
"name": "pet",
},
Object {
"description": "Access to Petstore orders",
"name": "store",
},
Object {
"description": "Operations about user",
"externalDocs": Object {
"description": "Find out more about our store",
"url": "http://swagger.io",
},
"name": "user",
},
],
"termsOfService": "http://swagger.io/terms/",
"title": "Swagger Petstore",
"version": "1.0.0",
}
`;

exports[`oas service openapi v3 1`] = `
Object {
"contact": Object {
"email": "apiteam@swagger.io",
},
"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.",
"id": "?http-service-id?",
"license": Object {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html",
},
"name": "Swagger Petstore",
"security": Array [],
"securitySchemes": Array [
Object {
"description": undefined,
"flows": Object {
"implicit": Object {
"authorizationUrl": "https://petstore.swagger.io/oauth/dialog",
"scopes": Object {
"read:pets": "read your pets",
"write:pets": "modify pets in your account",
},
},
},
"in": undefined,
"name": undefined,
"type": "oauth2",
},
Object {
"description": undefined,
"in": "header",
"name": "api_key",
"type": "apiKey",
},
],
"servers": Array [
Object {
"description": undefined,
"name": "Swagger Petstore",
"url": "https://petstore.swagger.io/v2",
},
Object {
"description": undefined,
"name": "Swagger Petstore",
"url": "http://petstore.swagger.io/v2",
},
],
"tags": Array [
Object {
"description": "Everything about your Pets",
"externalDocs": Object {
"description": "Find out more",
"url": "http://swagger.io",
},
"name": "pet",
},
Object {
"description": "Access to Petstore orders",
"name": "store",
},
Object {
"description": "Operations about user",
"externalDocs": Object {
"description": "Find out more about our store",
"url": "http://swagger.io",
},
"name": "user",
},
],
"termsOfService": "http://swagger.io/terms/",
"title": "Swagger Petstore",
"version": "1.0.0",
}
`;
Loading

0 comments on commit fc2c00e

Please sign in to comment.