-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Code clean-up: refactor CodegenResponse, CodegenProperty and CodegenParameter #20
Comments
As a first step, we should ensure consistency between the properties of each Codegne. For example:
|
An other related topic, we need access to the openAPI instance, see #83 |
Discussed in #75, |
Hi, could you explain me please the reason those classes do not have a complexType property as has a CodegenProperty (in other to have both the base collection type and its inner type)? |
Java Helidon Server MP Basic generator
…stallation Test installation in Travis
CodegenResponse
,CodegenProperty
andCodegenParameter
are very similar, but for the moment they to not share nothing.With OAS2 specification, it made sense to have three objects because every of these concepts was different in the spec. Now with OAS3, everything is Schema based. But in our methods
fromModel(..)
,fromProperty(..)
andfromResponse(..)
reimplement everything three times…The first step will be to identify what is common between
CodegenResponse
,CodegenProperty
andCodegenParameter
. A new abstract Codegen should be created:AbstractSchemaBasedCodegen
(or something like that). It contains the common stuff and it is derived from the schema.Then we will be able to remove the redundancy in
DefaultCodegen
and we will have something that works the same way for consumers ofCodegenResponse
,CodegenProperty
andCodegenParameter
.The text was updated successfully, but these errors were encountered: