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

Add a new jetbrains http client generator #14477

Merged
merged 25 commits into from Jan 31, 2023

Conversation

jlengrand
Copy link
Contributor

@jlengrand jlengrand commented Jan 18, 2023

This PR is currently a WIP, in order to get feedback on it.

This PR adds (basic) support for the Jetbrains HTTP Client. I intend, with your permission, to be the owner of that generator in the future.

For a given OpenAPI file, the current generator creates a HTTP request for each endpoint, with variable parameters where necessary. It also supports Content-Type headers.

For the 3.0 Petstore, you can find the generated README as well as one of the generated API Files.

This PR currently lacks tests, and I also want to add minimal support for additional headers as well before it gets merged.

With the newly released Jetbrains HTTP Client CLI, I believe this generator can be useful to quickly generate full testing landscape for project APIs, and potentially include them as part of automated CI as well.
You can find a list of features that I want to add in the longer run over here.

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/utils/export_docs_generators.sh
    
    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*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (6.3.0) (minor release - breaking changes with fallbacks), 7.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.

@jlengrand
Copy link
Contributor Author

Can someone help with this? I tried locally but I don't see any change that should be committed?

@jlengrand
Copy link
Contributor Author

jlengrand commented Jan 21, 2023

Remove what I said, it's ready to be merged @wing328 !

@wing328
Copy link
Member

wing328 commented Jan 28, 2023

@jlengrand I think this looks good to start with.

Do you know if there's any easy way to test the auto-generated output in the CI (e.g. Github workflow)?

@wing328
Copy link
Member

wing328 commented Jan 30, 2023

can you please resolve the merge conflicts when you've time?

will try to include it in the upcoming v6.3.0 release

@jlengrand
Copy link
Contributor Author

When is that? Wanted to look at creating some tests as you requested

@jlengrand
Copy link
Contributor Author

Alright @wing328 I fixed the conflicts, and also added the generator in the README which I had forgotten

@wing328 wing328 merged commit eca9ec7 into OpenAPITools:master Jan 31, 2023
@wing328 wing328 changed the title Feat/jetbrains http client Add a new jetbrains http client generator Feb 1, 2023
@piotrkpaul
Copy link

Hello @jlengrand, thanks for the great work! Are you considering payload generation for this one?

@jlengrand
Copy link
Contributor Author

Hey there! I started working on adding functionalities (here for now : jlengrand#12) but the work is going slower than I'd like to :). It's on the agenda, I just don't know how.

I'd be happy to review any merge request if you want to help though!

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.

None yet

3 participants