feat: CLI option to display statistics #807
mtovt
started this conversation in
Feature request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
While the generator is unstable, I suggest adding a flag to display information about the generated code after the execution. For example,
openapi-client-generator generate --url {OPENAPI_URL} --statistics
. It might be helpful to understand the current situation and performance of new pull requests. For instance, for one of my OpenAPI specs, the generator produces 162 schemas, while OpenAPI contains 221 schemas. It is the same situation with endpoints. It generates only 271, while OpenAPI contains 333. Also, I'd like to count the number of each exception that occurred. It fails for several reasons. And it would be great to see performance for each patch in development.Describe the solution you'd like
It seems we should add the data class with metrics from OpenAPI and metrics from the generated client. And compare these metrics after the generation process. I've already implemented a hacky solution without the cli option in this branch. It's not a final version and should be extended by other metrics. It will output:
Describe alternatives you've considered
Additional context
It seems this is not difficult to implement. I'd like to receive feedback about the feature and metrics that may be useful to add.
Beta Was this translation helpful? Give feedback.
All reactions