Fix: "isAlias" of CodegenModel#2758
Merged
wing328 merged 8 commits intoOpenAPITools:masterfrom Feb 19, 2020
Merged
Conversation
ackintosh
commented
Apr 29, 2019
| ); | ||
|
|
||
| Assert.assertTrue(model.isAlias); | ||
| Assert.assertEquals("string", model.dataType); |
Contributor
Author
There was a problem hiding this comment.
In some of generators (e.g. Kotlin which supports Type Alias), it may expected that the dataType property has a specific model type for better type alias support.
ref #2574
Contributor
Author
|
cc @OpenAPITools/generator-core-team |
wing328
reviewed
Apr 30, 2019
Member
|
Looks like the fix breaks the haskell client generator: |
|
@ackintosh @wing328 I realized that #2574 is still open... I would appreciate if this would find its way into a release soon. Thanks. |
Contributor
Author
|
Thanks for pinging me. I'll restart working on this issue later this week. 😃 |
Contributor
Author
|
I've fixed the error in haskel client generator. @wing328 Please have a look when you have time. |
Member
|
cc @OpenAPITools/generator-core-team as well. |
Member
|
Looks good to me but I didn't test it locally. |
MikailBag
pushed a commit
to MikailBag/openapi-generator
that referenced
this pull request
Mar 23, 2020
* Add test case to reproduce the issue OpenAPITools#2574 * Fix: an alias of "an alias of simple OAS type" has an incorrect property `isAlias: false` * Use ModelUtils instead of referring the "type" value directly * Delete an unnecessary condition * Tweak: the order of conditions * Fix wrong "isAlias" value on ComposedSchema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.master,. Default:3.4.x,4.0.xmaster.Description of the PR
A CodegenModel instance built from the
MyParameterTextFielddefinition should be alias. (the instance should have a propertyisAlias = true.)