I'm trying to do a test with a POST request on my Swagger Documentation, but I'm having the following trouble:
On Swagger Editor I can test it normally, but on Swagger UI the Request body field doesn't appears, so I can't put my email and password to test the request.
Here you can see the Request body field with data examples ready to be edited:
Swagger Editor Example
And here you can see that Swagger UI doesn't shows it:
Swagger UI Example
Note: I've generated a nodejs-server.
My .yaml
code:
openapi: '3.0.1'
info:
version: 1.0.0
title: Test
description: Test openapi.
servers:
- url: http://localhost:3005
paths:
/login:
post:
summary: Login
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/login'
responses:
200:
description: Test
components:
schemas:
login:
type: object
properties:
email:
type: string
example: example@example.com.br
password:
type: string
format: password
example: example123
expires:
type: integer
example: 86400
required:
- email
- password