Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[CLI] Initial implementation for batch generation #3789
Description of the PR
Allows for generating multiple outputs via config. Just specify multiple config files on command line.
Intent for this is to reduce CI times to generate outputs as well as to reduce time for users to run ensure-up-to-date to meet PR standards.
openapi-generator batch --includes-base-dir `pwd` --fail-fast -- bin/ci/*
As part of this implementation, the batch command support a customized JSON key,
Allows for generating multiple outputs via config. Just specify multiple config files on command line. Intent for this is to reduce CI times to generate outputs as well as to reduce time for users to run ensure-up-to-date to meet PR standards. Example command: openapi-generator batch --includes-base-dir `pwd` --fail-fast -- bin/ci/* --- As part of this implementation, the batch command support a customized JSON key, `!include`. If this key's value refers to an existing file, that file's contents are "unwrapped" into the config during deserialization. This allows us to easily point to the same configs used by our sample scripts without modifying the CLI generate task's switches or assumptions.
If it's ever needed again… here's the small program I used to generate JSON from existing bash scripts: https://github.com/jimschubert/openapi-generator-commands-processor
Some Petstore Play server files have changed ...
Is that due to mismatch in the script (play server) and the corresponding JSON files under ./bin/ci ?
* master: (110 commits) [golang] Regenerate all go samples (#3988) Better tests for string (number) (#3953) Add missing enum processing in C++ codegen, already present for Qt5 (#3986) [C++] [Pistache] Removed deprecated warnings (#3985) [C++][Pistache] Simplified model template (#3417) add go oas3 petstore to ensure up-to-date (#3979) replace gitter with slack in the doc (#3977) Fix wrong variable name in LessThan and LessThanOrEqual asserts (#3971) #3957 - Removed hardcoded baseUrl (#3964) Regenerate go openapi3 samples (#3975) [rust] Make it easier to test rust client generator (#3543) Fix issue3635 (#3948) add gradle repository (#3867) [java] allow to use setArtifactVersion() programmatically (#3907) Add a link to DevRelCon SF 2019 (#3961) Add a link to a medium blog post (#3960) update maven-compiler-plugin version (#3956) fix generateAliasAsModels in default generator (#3951) Implement BigDecimal to Decimal in swift4 for currency data as type=string format=number (#3910) Add F# Functions server generator (#3933) ...
@jimschubert I don't think CircleCI does that but I could be wrong. From what I know only shippable and Appveyor will try to test against the merge commit.
Anyway, it's still good to merge the latest master into this branch. I'll do it later today to see if the issue goes away.
* master: (35 commits) [haskell-http-client] update samples (#4073) [haskell-http-client] Bump deps to LTS 14.7 (#4068) update release for 4.2.0 [typescript-axios] Fix api generating incorrect seralization type check (#4051) prepare 4.1.3 release (#4052) typescript-node: form data file (#3967) Add a link to blog post on vertx and openapi (#4048) better wording for apiNameSuffix option description (#4045) [Ruby] fix ruby test, update error message (#4041) [PHP] Correctly format JSON in headers (#4024) [haskell-http-client] add dateTimeParseFormat cli option - overrides the format string used to parse a datetime (#4037) Add frankyjuang to the C# technical committee (#4036) Feature/api name suffix (#3918) [F#] minor improvements to the generators (#3968) Repaired Checkstyle (#4029) mockito 3.1.0 (#4035) typescript-fetch: fix return type of primitive value (#4028) [typescript][node]: Add accept header if produces is not empty (#3966) [haskell-http-client] disable unused import warning in Core.hs (#4020) Add a link to the tutorial in http4k (#4019) ...
@wing328 the usage page is all "public" commands. The batch generation command is hidden, and I think it should remain CI-only until we work out any kinks. For example, I'm wondering if we should change all shell scripts directly under
I'm thinking about incorporating this into the CI scripts as a separate PR. This will require that we run the
* master: (78 commits) Replaced dashes with underscores in build.gradle files. (#4092) [cxf-cdi] use @FormParam for form parameters when it is not Multipart (#4125) Corrections to script names (#4135) [python] Add missing keywords python (#4134) Update PULL_REQUEST_TEMPLATE.md (#4080) revert the fix to broken links Rename property name from propertyRawName to propertyBaseName (#4124) [Go] Fix go.mod and go.sum for 1.13 (#4084) [kotlin] add option for non public api (#4089) Added new discriminator RawName property to preserve declared discriminator for @JsonTypeInfo annotations (#3320) Fix links to other files (#4120) [JAVA][JAXRS] Fix parameters validation (#3862) Make Resttemplate thread safe by using the withHttpInfo pattern used by many other generated clients (#4049) Disabling linting for typescript-fetch (#4110) [Kotlin][Client] fix missing curly bracket when the model contains enum property (#4118) Fix NPE in Elm path parameter (#4116) test aiohttp first (#4117) add back ruby client folders update petstore samples [CLI] Initial implementation for batch generation (#3789) ...