Skip to content

Instantly share code, notes, and snippets.

@giuliana-bezerra
Created September 21, 2021 14:26
Show Gist options
  • Save giuliana-bezerra/f5c980ef79bc627a6f355c8fe426fb60 to your computer and use it in GitHub Desktop.
Save giuliana-bezerra/f5c980ef79bc627a6f355c8fe426fb60 to your computer and use it in GitHub Desktop.
API de funcionários para testar a configuração do CORS no WSO2 Microgateway.
---
openapi: 3.0.0
servers:
- url: http://localhost:8080
info:
description: 'API de funcionarios para testes de CORS.'
version: 1.0.0
title: Funcionarios
x-wso2-basePath: /api/v1
x-wso2-production-endpoints: '#/x-wso2-endpoints/dev'
paths:
'/funcionario/{nome}':
get:
summary: Find funcionário by nome
description: Returns a single funcionário
operationId: getFuncionarioByNome
parameters:
- name: nome
in: path
description: Nome do funcionário
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/xml:
schema:
'$ref': '#/components/schemas/Funcionario'
application/json:
schema:
'$ref': '#/components/schemas/Funcionario'
'404':
description: Funcionário not found
security:
- api_key: []
components:
schemas:
Funcionario:
type: object
properties:
nome:
type: string
idade:
type: integer
format: int64
cargo:
type: string
xml:
name: Funcionario
securitySchemes:
api_key:
type: apiKey
name: api_key
in: header
x-wso2-endpoints:
- dev:
urls:
- http://localhost:8080
securityConfig:
type: basic
username: user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment