Open stanislavt opened 7 years ago
Can you provide some additional detail on what you are trying to do? What are "custom endpoints"? Would that be an endpoint not defined in the API shema?
Sure.
I want to create POST /test/
api.yaml
has next rows:
/test:
post:
summary: Test import
parameters:
-
in: body
name: body
schema:
$ref: '#/definitions/TestBody'
tags:
- Test
responses:
201:
schema:
$ref: '#/definitions/Test'
How can I define body
object using joi and include it into swaggerize?
Why do I need it for: I have dependencies in body properties.
E.g.
email
should be unique in DB table.
status
is depends on date
Could you please explain me, how can I use JOI schemas for custom endpoints? It really doesn't clear id documentation.