-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improvements to online codegen #55
Conversation
@cbornet I've tested out this pull request, and I had a question. The previous jetty implementation used reflection to update enum values for all language implementations in the client and server apis, such that these options would remain up to date as generators were added/deleted/renamed. It looks like this reflection isn't done on this branch, so when I query for a scala client for example, I get an error: query
response
If I query for the modified scala client name,
I get the expected result:
Do you have plans to include this reflection-based update in this PR? If not, can you update the enum values for the client and server options as part of this PR and then we can create an issue to do this via reflection. |
@jmini Indeed, that would be better. I'll check if it can be done with Springfox 🤞 |
2afe600
to
54394fc
Compare
WORKDIR /generator | ||
|
||
COPY target/openapi-generator-online-3.0.0-SNAPSHOT.jar /generator/openapi-generator-online.jar | ||
COPY target/*.jar /generator/openapi-generator-online.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbornet I tried *.jar before but I got errors and that's why I used the full filename instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird. Works on my machine 😉 . And that's also what we do in JHipster.
Did you do mvn clean
before packaging ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can go with this. If it breaks with errors, we'll just revert the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I also tested *.jar locally before and worked fine for me)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the error reported by the CI (travis):
Removing intermediate container eaef9e5f5b5b
Step 3/6 : COPY target/*.jar /generator/openapi-generator-online.jar
When using COPY with more than one source file, the destination must be a directory and end with a /
Ref: https://travis-ci.org/OpenAPITools/openapi-generator/builds/379603374
I'll submit a PR to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it seems there are multiple jar in the target directory. That shouldn't be the case, isn't it ?
Can you try COPY target/openapi-generator-online*.jar /generator/openapi-generator-online.jar
so there's no need to modify the Dockerfile for each new version ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same result:
Removing intermediate container 5b368abf32be
Step 3/6 : COPY target/openapi-generator-online-*.jar /generator/openapi-generator-online.jar
When using COPY with more than one source file, the destination must be a directory and end with a /
Let's go with the hard-coded solution for the time being as it's not something we want to automate with the highest priority.
@jmini I have something working for the dynamic allowableValues with sprinfox. PR incoming. |
* Updated and new sample config files; not committing the resulting generated sample code yet * fix samples compilation errors (OpenAPITools#56) Signed-off-by: aserkes <andrii.serkes@oracle.com> Signed-off-by: aserkes <andrii.serkes@oracle.com> Signed-off-by: aserkes <andrii.serkes@oracle.com> Co-authored-by: aserkes <andrii.serkes@oracle.com>
…norepo chore(deps): update nrwl monorepo to v10.3.0
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if 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
.Description of the PR