DEV Community

Discussion on: Do you use Swagger, or document your API?

patarapolw profile image
Pacharapol Withayasakpunt Author

JSON validation means that the server will not accept any wrong JSON schema.

Also, I have to make sure my database, especially if it is NoSQL, will not break with bad data.

Never trust user inputs.

artoodeeto profile image

if its a public API you can use ajv I guess. But if it's within a team OpenAPI will do because the team will have to create the payload from frontend to backend.