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

Fix postman test, update logback to newer version #17329

Closed
wants to merge 55 commits into from
Closed

Conversation

wing328
Copy link
Member

@wing328 wing328 commented Dec 6, 2023

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (For Windows users, please run the script in Git BASH)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.1.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@wing328 wing328 requested a review from jimschubert as a code owner December 6, 2023 06:59
@@ -786,7 +786,7 @@ public void testQueryParameterDescription() throws IOException {
output.deleteOnExit();

final CodegenConfigurator configurator = new CodegenConfigurator()
.setGeneratorName("postman-v2")
.setGeneratorName("postman-collection")
.setInputSpec("./src/test/resources/SampleProject.yaml")
Copy link
Member Author

Choose a reason for hiding this comment

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

@gcatanese can you please take a look at this line when you've time? SampleProject.yaml is a config file but not an OpenAPI spec.

Copy link
Member Author

Choose a reason for hiding this comment

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

Same issue in line 766

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I made a mistake re-using a test on a local implementation (I did miss the CI failures though). The test file is "src/test/resources/3_0/postman-collection/SampleProject.yaml"

Copy link
Member Author

Choose a reason for hiding this comment

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

what about replacing these tests with a workflow in github to test the output (postman collection) with a Python/JS script instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

The unit tests allow me to test before pushing (this is why I cannot believe I miss this), but the idea of a Github workflow seems good. What is the idea:

  • remove/reduce this type of testing?
  • Python script on Github? Can you elaborate or provide an example? I can look into it and make a PR

Copy link
Member Author

Choose a reason for hiding this comment

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

can you please PM me via Slack to further discuss this?

This was removed in #16802, but using a higher value than 1,
or at least making this configurable makes complete sense.

Without this, we get a lot of these log messages:

[ WARNING] Connection pool is full, discarding connection:
@@ -786,7 +786,7 @@ public void testQueryParameterDescription() throws IOException {
output.deleteOnExit();

final CodegenConfigurator configurator = new CodegenConfigurator()
.setGeneratorName("postman-v2")
.setGeneratorName("postman-collection")
Copy link
Contributor

Choose a reason for hiding this comment

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

@wing328 Indeed it should be

  .setGeneratorName("postman-collection")
  .setInputSpec("src/test/resources/3_0/postman-collection/SampleProject.yaml")

wing328 and others added 25 commits December 6, 2023 17:50
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [csharp] Support 420 HTTP code

* [csharp] Support 420 HTTP code

* [csharp] Support 420 HTTP code

* [csharp] Support 420 HTTP code

* [csharp] Support 420 HTTP code
* Add optional parameter for request body

* Adapt Test

* Add test

* Format code

* Remove extra method

* Add optional for pojos

* Add optional for pojos

* Add bean validation for Optional

* Add default values + test

* Rename test
* fix: go-server unresolved function NewstringFromValue for enums

* fix: go-server change isRef to isEnumRef in controller-api template
* Fix broken link to csharp-netcore generator

The example source URL of the csharp-netcore generator pointed to the master version of the repo, but the generator has been renamed or removed and the URL is broken. I updated the link to the latest pre 5.0.0 version, since the text talks about pre 5.0.0 version of the openapi generator.

* Update link to point to csharp generator
* Ruby Client for Faraday: fix file downloading

In MR #16876, a bug was introduced that causes file downloading to fail
for the Faraday adapter.

This commit fixes the obvious missing parameter for the method
call to download_file() and the missing variable `request` for saving the
response value of the call to build_request().

Signed-off-by: Daniel Schnell <[email protected]>

* Add automatically generated changes.

---------

Signed-off-by: Daniel Schnell <[email protected]>
* add new ruby echo api clients

* add tests for ruby faraday file download

* add file download test to ruby Typhoeus

* add ruby workflow, add tests for ruby httpx

* update

* fix
* fix: change indent style to tab in the mustache to generate Go code

* docs: standardize the language names for code blocks

* docs: change indent style to tab in the code blocks

* update: regenerate samples

* `./bin/generate-samples.sh ./bin/configs/*.yaml`
* Add support for webhooks

* Test webhook generation with Go Gin server

* Generate samples

* Removing \t

* Remove tabs
* Created kotlin jvm spring restclient

* Fixed kotlin jvm-spring-restclient

* Fixed earlier problems

* Fixed earlier problems

* Updated kotlin.md
* [csharp][generichost] Handle obsolete params and methods

* update samples

---------

Co-authored-by: William Cheng <[email protected]>
* fix NPE in the example generator

* fix any type in 3.1 spec

* use log error instead
…7165)

* [4947][java]: adds support for validation of primitives in arrays

* [4947][java]: prevents generation '@Valid' for Object

* [4947][java]: test against different codegens and stick to primitive

* [4947][java]: code review

* [4947][java]: enhance getBeanValidation

* [4947][java]: adds email

* [4947][java]: removes unnecessary override

* [4947][java]: adds postProcessResponseWithProperty

* [4947][java]: adds missing import {{javaxPackage}}.validation.Valid

* [4947][java]: adds missing useBeanValidation

* [4947][java]: fix use rootJavaEEPackage for helidon
* Implementing retry logic to restTemplate

* Fixing the issue

* Adding import

* Fix

* Fix

* minor update, add tests

* fix

* Adding the maxRetryAttempt, threadWaitTime as additionalProperty

* Updating the apiClient

* Removing reduntant variable

* Generating samples

* Fixing format

---------

Co-authored-by: Rubini <[email protected]>
Co-authored-by: William Cheng <[email protected]>
tiffmaelite and others added 11 commits December 13, 2023 15:07
…y string parameters (#17386)

* Add check for input if is Map type

* Update Pet samples

* Add PetApi support for filter by Pet property

* Clean up

* update samples

* remove manual test

---------

Co-authored-by: ameenhaq <[email protected]>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(java): apache-httpclient serialization error

fixes following related issue:
#12797

* docs(java): update samples and docs
@gcatanese
Copy link
Contributor

See #17412 17412

gcatanese and others added 11 commits December 18, 2023 10:52
* Add Python tests

* Add workflow to verify Postman samples

* Correct path
The modelNameMappings were introduced with PRs #16209, #16234 and are
now also used in the ruby client generator.
* Add missing Jackson converter for Retrofit

This commit adds the missing configuration for a ApiClient so all Jackson serializations will start to work correctly.

* Add sample project code for Retrofit Jackson
* implemented generalized content-type handling

* regenerated samples

* addressed implementation review feedback

* added tests for proposed improvements
* fix(typescript-*): nullable additionalProperty values

* chore(samples): update samples
@wing328 wing328 closed this Dec 21, 2023
@wing328 wing328 deleted the fix-test branch December 21, 2023 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.