Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #14721
Closed
Open
Issue created Feb 16, 2023 by Administrator@rootContributor

[REQ] JAXRS Generator Server with @RolesAllowed

Created by: iriikoad

Hi,

I tried different generator to generate JAXRS Rest interfaces, and I didnt found a way to get @RolesAllowed("**") on methods that are protected. I add RolesAllowed in security, I'd like to get @RolesAllowed in the code generated, but the annotation is not added.

Example:

  /api/auth/current:
    get:
      tags:
      - Auth Resource
      operationId: AuthResource_getCurrentName
      responses:
        "200":
          description: OK
          content:
            text/plain:
              schema:
                type: string
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - cookieAuth:
        - '**'
      - RolesAllowed:
        - '**'
Assignee
Assign to
Time tracking