Código completo
openapi: 3.0.1
info:
title: API de Consultório
description: API para controlar médicos e suas especialidades dentro do consultório.
version: 0.0.1
termsOfService: https://mockapi.io/
contact:
name: Suporte a Devs
email: contact@example.com
url: https://mockapi.io/
license:
name: GPLv3
url: https://www.gnu.org/licenses/gpl-3.0.html
externalDocs:
description: Documentação Burocrática--Documentação externa
url: https://mockapi.io/
servers:
- url: https://62b07227e460b79df04604d4.mockapi.io/
description: API de teste
paths:
/descricao:
get:
summary: Recupera todas as especialidades
responses:
200:
description: Sucesso
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
especialidade_id:
type: string
/descricao/{id}:
get:
sumary: Recupera uma entidade pelo ID
parameters:
- name: id
in: path
schema:
type: integer
required: true
responses:
200:
description: Sucesso
content:
application/json:
schema:
type: object
properties:
id:
type: integer
especialidade_id:
type: string
Erros apresentados
Errors
Resolver error
Cannot read properties of undefined (reading 'descricao')
Resolver error
Cannot read properties of undefined (reading 'descricao')
Structural error at
should NOT have additional properties
additionalProperty: /descricao/{id}
Jump to line 0
Resolver error
Cannot read properties of undefined (reading 'descricao')