Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: DTO models autogeneration script #14

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

BucekJiri
Copy link
Contributor

Script for autogeneration of DTO model structs from an OpenAPI spec.

All you need to do is change the OPEN_API_SPEC variable in the script to the URL of the spec file in your project's Swagger.

The script will generate or update the models based on the API spec.

image

@jakobmygind
Copy link
Contributor

Nice! Would it be possible inside the script to auto-install the generator if it isn't installed already?

Copy link
Contributor

@jakobmygind jakobmygind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@BucekJiri
Copy link
Contributor Author

I had the same idea with the installation. The problem is everybody has a different system set up for this. Most people probably use Homebrew, so we could just add brew install openapi-generator in the script which just continues if the generator is already installed. If somebody does not have Homebrew installed, the script will fail though.

@BucekJiri BucekJiri merged commit 27fb06c into main Jan 24, 2023
@BucekJiri BucekJiri deleted the feat/dtoModelAutogenerationScript branch January 24, 2023 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants