How to generate a Swagger #definition from sample JSON

You can use this JSON-to-OpenAPI schema converter:
https://roger13.github.io/SwagDefGen/

(GitHub project)

I haven’t used it personally though, so I’m not sure how good it is.

Since OpenAPI uses a subset of JSON Schema, you could also use one of the JSON Schema generators, however you may need to manually tweak the generated definition to make it OpenAPI-compatible.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)