swagger-api / swagger-api/swagger-codegen

[Spring] Authorities for basic auth - Annotations and swagger-ui

Open
#4,399 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.