ElSnoMan / pyclinic

A library to test services in Python
MIT License
5 stars 1 forks source link

CLI: Convert OpenAPI Spec to Models #9

Open ElSnoMan opened 3 years ago

ElSnoMan commented 3 years ago
poetry run pyclinic generate-models --input-file-type TYPE --input IN_FILE --output OUT_FILE
ElSnoMan commented 3 years ago

Currently, PyClinic comes with datamodel-codegen, so:

If the user needs to generate models from a Postman Collection

pyclinic generate-models --input-file [path/to/collection.json]

If the user needs to generate models from a Swagger spec, OpenAPI spec, generic JSON, etc.

datamodel-codegen --input [path/to/file] --output [path/to/save]