swagger-api / swagger-api/swagger-codegen
[JAVA] swagger-codegen ApiClient with Security/SSL
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Question on Swagger's generated code for ApiClient. I noticed that you have a sample that generates SSL code for ApiClient. My Rest API uses swagger and gradle to generate the Rest API. I would like to know how to generate the same type of ApiClient with the use of SSL.My yaml spec has both 'http' and 'https' as schemes but does not produce any generated code that uses SSL.
I would like to be able to generate the sample ApiClient as shown below:
Appreciate any input you can give.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the generated client in samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/ApiClient.java with the client produced from the reporter's YAML and Gradle setup. Determine how the sample's SSL behavior is enabled and what generated output is expected when both http and https schemes are declared; done means the generation path and required configuration are documented or supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100