swagger-api / swagger-api/swagger-codegen
[Spring] Authorities for basic auth - Annotations and swagger-ui
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Assuming we have basic authentication. Each API requires specific authorities to access it.
We would like to have the option to declare these authorities in the spec.
In addition, it would be easier if the code-gen could use the above and generate the relevant annotations (Spring security - @Secured/@PreAuthorized - using a template)
Is it possible to achieve this with the latest version ? If not, is it planned for the next versions?
Swagger-codegen version
We use version 2.2.1
Thanks
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 reviewing how the specification represents basic authentication and how code generation and swagger-ui currently consume it. Trace whether authorities can be declared in the spec and whether Spring Security annotations can be generated from them. Done means a documented supported path or a clearly scoped implementation plan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, authorization, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100