Last active
September 13, 2021 16:22
-
-
Save ilozano2/e7e37c75e5308bec522e936a09d8d6f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"openapi": "3.0.1", | |
"info": { | |
"title": "Animal Rescue (multiple auths)", | |
"description": "Sample application for Spring Cloud Gateway commercial product demos.", | |
"version": "1.0.0-K8s-hack" | |
}, | |
"externalDocs": { | |
"url": "https://github.com/spring-cloud-services-samples/animal-rescue/" | |
}, | |
"servers": [ | |
{ | |
"url": "http://gatewaywithssologinfiltertest.spring.animalrescue.online" | |
} | |
], | |
"paths": { | |
"/api/animals": { | |
"summary": "Route ID: animal-rescue-animal-rescue-backend-routes-0", | |
"get": { | |
"tags": [ | |
"pet adoption" | |
], | |
"summary": "Retrieve pets for adoption.", | |
"description": "Retrieve all of the animals who are up for pet adoption.", | |
"responses": { | |
"200": { | |
"description": "Ok", | |
"headers": { | |
"X-Remaining": { | |
"description": "RateLimit: number of requests remaining", | |
"schema": { | |
"type": "integer" | |
} | |
} | |
} | |
}, | |
"429": { | |
"description": "Too Many Requests. RateLimit=2,10s", | |
"headers": { | |
"X-Retry-In": { | |
"description": "RateLimit: time in milliseconds until retry", | |
"schema": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/api/actuator/**": { | |
"summary": "Route ID: animal-rescue-animal-rescue-backend-routes-1", | |
"get": { | |
"tags": [ | |
"actuator" | |
], | |
"summary": "API Actuator endpoints", | |
"description": "Access API actuator endpoints to provide current status of backend service.", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
} | |
} | |
}, | |
"put": { | |
"tags": [ | |
"actuator" | |
], | |
"summary": "API Actuator endpoints", | |
"description": "Access API actuator endpoints to provide current status of backend service.", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"actuator" | |
], | |
"summary": "API Actuator endpoints", | |
"description": "Access API actuator endpoints to provide current status of backend service.", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"actuator" | |
], | |
"summary": "API Actuator endpoints", | |
"description": "Access API actuator endpoints to provide current status of backend service.", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
} | |
} | |
} | |
}, | |
"/api/whoami": { | |
"summary": "Route ID: animal-rescue-animal-rescue-backend-routes-2", | |
"get": { | |
"tags": [ | |
"sso" | |
], | |
"summary": "Retrieve user information", | |
"description": "Retrieve the current authenticated user's information.", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
}, | |
"302": { | |
"description": "Redirect client to SSO login page to authenticate for authorizing access.", | |
"headers": { | |
"Location": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"security": [ | |
{ | |
"openId": [], | |
"BearerAuth": [] | |
} | |
] | |
} | |
}, | |
"/api/animals/{animalId}/adoption-requests/{adoptionId}": { | |
"summary": "Route ID: animal-rescue-animal-rescue-backend-routes-3", | |
"put": { | |
"tags": [ | |
"pet adoption" | |
], | |
"summary": "Pet adoption API", | |
"description": "Manage pet adoptions.", | |
"requestBody": { | |
"description": "Manage adoption requests", | |
"content": { | |
"application/json": { | |
"schema": { | |
"required": [ | |
"adopterName", | |
"email" | |
], | |
"type": "object", | |
"properties": { | |
"adopterName": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string", | |
"format": "email" | |
}, | |
"notes": { | |
"type": "string" | |
} | |
}, | |
"description": "Adoption request schema" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Ok" | |
}, | |
"302": { | |
"description": "Redirect client to SSO login page to authenticate for authorizing access.", | |
"headers": { | |
"Location": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"security": [ | |
{ | |
"BearerAuth": [] | |
} | |
] | |
}, | |
"delete": { | |
"tags": [ | |
"pet adoption" | |
], | |
"summary": "Pet adoption API", | |
"description": "Manage pet adoptions.", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
}, | |
"302": { | |
"description": "Redirect client to SSO login page to authenticate for authorizing access.", | |
"headers": { | |
"Location": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"security": [ | |
{ | |
"BearerAuth": [] | |
} | |
] | |
}, | |
"parameters": [ | |
{ | |
"name": "animalId", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"name": "adoptionId", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/api/animals/{animalId}/adoption-requests": { | |
"summary": "Route ID: animal-rescue-animal-rescue-backend-routes-5", | |
"get": { | |
"tags": [ | |
"pet adoption" | |
], | |
"summary": "Pet adoption API", | |
"description": "Manage pet adoptions.", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
}, | |
"302": { | |
"description": "Redirect client to SSO login page to authenticate for authorizing access.", | |
"headers": { | |
"Location": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"security": [ | |
{ | |
"BearerAuth": [] | |
} | |
] | |
}, | |
"parameters": [ | |
{ | |
"name": "animalId", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/rescue/login": { | |
"summary": "Route ID: animal-rescue-animal-rescue-frontend-routes-0", | |
"get": { | |
"tags": [ | |
"sso" | |
], | |
"summary": "Animal Rescue login link", | |
"description": "SSO enabled path used by the login button", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
}, | |
"302": { | |
"description": "Redirect client to SSO login page to authenticate for authorizing access.", | |
"headers": { | |
"Location": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"security": [ | |
{ | |
"BearerAuth": [] | |
} | |
] | |
} | |
}, | |
"/rescue/**": { | |
"summary": "Route ID: animal-rescue-animal-rescue-frontend-routes-1", | |
"get": { | |
"tags": [ | |
"ui" | |
], | |
"summary": "Animal Rescue home page", | |
"description": "Animal Rescue home page that doesn't require SSO login", | |
"responses": { | |
"200": { | |
"description": "Ok" | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"securitySchemes": { | |
"openId": { | |
"type": "openIdConnect", | |
"openIdConnectUrl": "https://dev-30932436.okta.com/oauth2/aus1s27hsyrVPWGq85d7/.well-known/oauth-authorization-server" | |
}, | |
"BearerAuth": { | |
"type": "http", | |
"scheme": "bearer" | |
} | |
} | |
}, | |
"groupId": "animal-rescue-hack2" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment