Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
DESIGNER-127: add test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaston Lodieu committed Nov 22, 2016
1 parent d5721f3 commit b37daf2
Show file tree
Hide file tree
Showing 2 changed files with 235 additions and 0 deletions.
95 changes: 95 additions & 0 deletions test/data/swagger-import/raml/swagger_security_conversion2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#%RAML 1.0
title: Security tryout
version: 1.0.0
baseUri: 'http://mazimi-prod.apigee.net/security'
protocols:
- HTTP
description: '#### Tries out different security configurations'
securitySchemes:
oauth2:
type: OAuth 2.0
settings:
authorizationUri: 'http://swagger.io/api/oauth/dialog'
accessTokenUri: ''
authorizationGrants:
- implicit
scopes:
- write:pets
- read:pets
basicAuth:
type: Basic Authentication
description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
internalApiKey:
type: Pass Through
description: Api Key Authentication
describedBy:
queryParameters:
api_key:
type: string
/getApiKey:
displayName: getApiKey
get:
displayName: GET_getApiKey
responses:
'200':
description: 'InternalApiKey. Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`'
queryParameters:
count:
description: Count of media to return.
type: integer
displayName: Count of media to return.
max_id:
description: Return media earlier than this max_id.s
type: integer
displayName: Return media earlier than this max_id.s
min_id:
description: Return media later than this min_id.
type: integer
displayName: Return media later than this min_id.
securedBy:
- internalApiKey
/getBasicAuth:
displayName: getBasicAuth
get:
displayName: GET_getBasicAuth
responses:
'200':
description: 'Basic Auth. Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`'
queryParameters:
count:
description: Count of media to return.
type: integer
displayName: Count of media to return.
max_id:
description: Return media earlier than this max_id.s
type: integer
displayName: Return media earlier than this max_id.s
min_id:
description: Return media later than this min_id.
type: integer
displayName: Return media later than this min_id.
securedBy:
- basicAuth
/getOauth2Auth:
displayName: getOauth2Auth
get:
displayName: GET_getOauth2Auth
responses:
'200':
description: 'Oauth2 Authorization. Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`'
queryParameters:
count:
description: Count of media to return.
type: integer
displayName: Count of media to return.
max_id:
description: Return media earlier than this max_id.s
type: integer
displayName: Return media earlier than this max_id.s
min_id:
description: Return media later than this min_id.
type: integer
displayName: Return media later than this min_id.
securedBy:
- oauth2:
scopes: [ read:pets ]
140 changes: 140 additions & 0 deletions test/data/swagger-import/swagger/swagger_security_conversion2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Security tryout",
"description": "#### Tries out different security configurations"
},
"schemes": [
"http"
],
"host": "mazimi-prod.apigee.net",
"basePath": "/security",
"paths": {
"/getBasicAuth": {
"get": {
"parameters": [
{
"name": "count",
"in": "query",
"description": "Count of media to return.",
"type": "integer"
},
{
"name": "max_id",
"in": "query",
"description": "Return media earlier than this max_id.s",
"type": "integer"
},
{
"name": "min_id",
"in": "query",
"description": "Return media later than this min_id.",
"type": "integer"
}
],
"security": [
{
"basicAuth": []
}
],
"responses": {
"200": {
"description": "Basic Auth. Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`"
}
}
}
},
"/getApiKey": {
"get": {
"parameters": [
{
"name": "count",
"in": "query",
"description": "Count of media to return.",
"type": "integer"
},
{
"name": "max_id",
"in": "query",
"description": "Return media earlier than this max_id.s",
"type": "integer"
},
{
"name": "min_id",
"in": "query",
"description": "Return media later than this min_id.",
"type": "integer"
}
],
"security": [
{
"internalApiKey": []
}
],
"responses": {
"200": {
"description": "InternalApiKey. Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`"
}
}
}
},
"/getOauth2Auth": {
"get": {
"parameters": [
{
"name": "count",
"in": "query",
"description": "Count of media to return.",
"type": "integer"
},
{
"name": "max_id",
"in": "query",
"description": "Return media earlier than this max_id.s",
"type": "integer"
},
{
"name": "min_id",
"in": "query",
"description": "Return media later than this min_id.",
"type": "integer"
}
],
"security": [
{
"oauth2": [
"read:pets"
]
}
],
"responses": {
"200": {
"description": "Oauth2 Authorization. Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`"
}
}
}
}
},
"securityDefinitions": {
"basicAuth": {
"type": "basic",
"description": "HTTP Basic Authentication. Works over `HTTP` and `HTTPS`"
},
"internalApiKey": {
"type": "apiKey",
"in": "query",
"name": "api_key",
"description": "Api Key Authentication"
},
"oauth2": {
"type": "oauth2",
"authorizationUrl": "http://swagger.io/api/oauth/dialog",
"flow": "implicit",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
}
}

0 comments on commit b37daf2

Please sign in to comment.