swagger-api / swagger-api/swagger-codegen
[java] how to change the default values in ApiOriginFilter.java
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The ApiOriginFilter.java is generated and has some default values added to the response headers.
Eg: For allow-control-allow-origin:* is set
Instead of a wildcard (*) being set to allow-control-allow-origin, I want to add some origin domain name.
Is this possible to achieve? If so, how do I add it?
Command line used for generation
mvn clean install
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 inspecting the generated ApiOriginFilter.java and the response-header defaults mentioned in the issue. Review how mvn clean install produces this file and determine where an origin domain could be configured or overridden. Done means the generated API uses the requested origin instead of * in allow-control-allow-origin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100