Skip to content
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

Sync with upstream #8

Merged
merged 467 commits into from
Aug 6, 2024
Merged

Sync with upstream #8

merged 467 commits into from
Aug 6, 2024

Conversation

sazapp-spectra
Copy link
Collaborator

@sazapp-spectra sazapp-spectra commented Aug 2, 2024

This is an attempt at syncing our fork with upstream - primarily to pull in my fix for oneOf, but also to pull in other fixes since March.

The files I had to manually merge were ~/src/openapi-generator-spectra/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache and ~/src/openapi-generator-spectra/modules/openapi-generator/src/main/resources/go-server/model.mustache; everything else (in the samples directory) was then regenerated via ye olde

  ./mvnw clean package 
  ./bin/generate-samples.sh ./bin/configs/*.yaml
  ./bin/utils/export_docs_generators.sh

Upstream changes I had to manually merge (because of conflicts in controller-api.mustache) were:
fix imports with go generation
add field name in parsing error messages
Fix: missing quotes for string default value
Fix: error handling and linting

Testing

Built a jar off of this branch, committed it to the lumos repo in this PR, and let the automation suite run against it.

Once this is in, I'll build a jar off of master and open a new lumos PR with that committed - the changes should look identical to the test PR, just with a jar not built off a random dev branch.

wing328 and others added 30 commits May 21, 2024 14:58
…alidation (OpenAPITools#18332)

* Fix java list validation

* Fix java list validation

* Fix java list validation

* Fix java list validation
* webclient: update junit to 5.x

* update samples

* update samples

* update samples

* update samples

* update samples

* clean up

* update samples

* update pom plugin version

* update tests
Depending on test exec environment, this test could linger around
for ~8 minutes, b/c pinging test.com will not resolve and run into
seveal timeouts.
…code (OpenAPITools#18751)

* Fix tests for parsing of additional type annotations

These were comparing the same things with each other and this could
not fail. Now using (as probably intended by the author) the before
unused ArrayList for assertion of the expectation.

* Remove Exception from signature that is never thrown

* Simplify assertions using AssertJ

* Replace stub implementation with abstract Mockito mock

* Cache flat parsed openapi results for faster test execution

Simply caching any calls to TestUtils.parseFlattenSpec that occur
at least twice.

* Fix some "Raw use of parameterized class 'Schema'" warnings
…ols#18755)

* Updated crystal dependencies to remedy build failure with a mutually conflicting library version.

* Samples updated from running PR-suggested build.
…ools#18759)

* Even with .nil? typecheck, compiler still fails due to .empty? call on nillable type. This appears a poor implementation issue by crystal-lang, but this explicit try avoids the issue for now.

* Made call more succinct.
…PITools#18728)

* Fix javaJaxRS template: remove deprecated in JDK9 method usage

* Fix javaJaxRS api template: regenerate samples
* Added authentication via Bearer-token api_key and basic for server and client

* Improved errorhandling

* Added check on oAuth audience to example

* Updates of the petstore files for Rust-server

* Moved module import to prevent issue in callbacks

* updated samples

* Fix for unused-qualifications issue

* updated sampmles
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](s4u/setup-maven-action@v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: s4u/setup-maven-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* moved service api into shared source

* moved service api into shared source

* This Scala cask change makes the service traits available to 
Both JVM and JS platforms.

It does this by moving the api interfaces into the cross-platform
Shared sources
…cs, maven & gradle plugin (OpenAPITools#18568)

* Mention that Golang generator also supports XML annotations

Looking at src/main/resources/go/model_simple.mustache and
src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
the GoLang seems to cater for withXml=true

* Fix maven plugin config description for `withXml`

* Add basic test for global withXml setting

* Use global withXml setting if not configured in ConfigOptions

Resolves OpenAPITools#3839 and OpenAPITools#5764

* Don't generate metadata or other files when only Models are tested

* Reformat table for readability

* Remove global property `withXml` from generator and docs

* Move WITH_XML constant out of system constants block

Currently there is only a single reference to this value in the whole
codebase (GoClientOptionsProvider). Maybe we should re-think how this
file is organised (i.e. provide a clearer split / mapping / understanding
what are system properties vs. global properties vs. configOptions and
where to put them).

* Remove global option `withXml` from Maven plugin (Breaking change)

This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes.

* Remove global property `withXml` from Gradle plugin (Breaking change)

This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes, so they can add it
to the `configOptions` map if required, or simply delete it

* Update samples to reflect removed `withXml` property

* Move `withXml` option into ConfigOptions for Java Microprofile sample

* Remove unused local vars and parameters

* Avoid repetition using fluent assertions

* Remove extraneous debug output
…orrectly [fix OpenAPITools#18742] (OpenAPITools#18743)

* fix serialization of OffsetDateTime

* update samples

* wrap import
SnowyLeopard and others added 22 commits July 25, 2024 11:18
* Add ArrayRule

* Run ./bin/utils/export_docs_generators.sh

* Add ArrayValidationErrorKind

* Add validation method

* Run ./bin/generate-samples.sh

* Add array rule property

* Rename minItem and maxItem => minItems and maxItems

* Fix uniqueItems template

* Tweaks

* Add sample property

* Run ./bin/generate-samples.sh
…19238)

* set style and explode

* update client

* fix

* set the newer version
)

* [Kotlin][Spring] fix OpenAPITools#19244 integer enum

* fix embedded array enum
* Update users.yml

Adding aspectivo  users.yml

* Add files via upload

Adding aspectivo logo file
…enAPITools#19253)

* [Kotlin][Client] Encode default values with kotlinx serialization

* [Kotlin][Client] Encode default values with kotlinx serialization
* revert problematic java-camel XML change

* generate samples
* support response ranges

* revert unintended change

* update try deserialize methods
…ssignment" in to_dict() (OpenAPITools#19223)

* [python] mypy fix for multiple arrays of objects

* [python] mypy test for multiple arrays of objects
…ned (OpenAPITools#19232)

* use default values for required vars when available

* update tests to existing config file

* cleanup OAS test

* Remove setting value in Get.

* Use Pascal Case for variable naming in Getter Function

* add a CLI option

* add a CLI option

* add a CLI option
* update docstring in go client, better code format

* update samples
I have not been active in the project for nearly 4 years, but remain
as a pingable maintainer on the readme. This is updating the readme to be
accurate. I only spend around 1-3 hours every other month lately on open-source,
so it's just an issue of time/availability.
…'oneOf' (OpenAPITools#19183)

* fix oneOf var names when no discriminator is used

* add OneOfWithComplexType to Go petstore schema

- an array of strings variant should end up with the same valid name
whether `useOneOfDiscriminatorLookup` is `true` or `false`
…rong derive clause on data classes which have a parent as well as are serializable. (OpenAPITools#19283)
@icubbon
Copy link
Collaborator

icubbon commented Aug 5, 2024

Can you create a matching PR in Lumos with the generated JAR so that we can see what the deltas are for us?

You should be able to do something like ./runInDocker.sh mvn install and that create the jar and put in somewhere in ~/.m2/.....

@sazapp-spectra
Copy link
Collaborator Author

I can reopen this one - this is the one that ran the automation updates against the code generated by this jar. I only closed it because I didn't want a jar built off a non-master branch getting into Lumos

Copy link
Collaborator

@icubbon icubbon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way too many changes here to review but I reviewed all generated files in the test PR in the Lumos repo and it looks good.

@gonzogomez
Copy link

I can reopen this one - this is the one that ran the automation updates against the code generated by this jar. I only closed it because I didn't want a jar built off a non-master branch getting into Lumos

Do you mind reopening as a formal pr. I cannot seem to find the build that ran the whole pipeline. There are so many generated changes wanted to make sure we can at least run sanity.

Copy link

@gonzogomez gonzogomez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reopening that other pr with generated changes!!!

@sazapp-spectra sazapp-spectra merged commit 32792d4 into master Aug 6, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.