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
  • Merge requests
  • !12297

[Micronaut] Improvements for Server and Client

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/andriy-dmytruk/micronaut-dev-4 into master May 05, 2022
  • Overview 0
  • Commits 10
  • Pipelines 0
  • Changes 138

Created by: andriy-dmytruk

This PR includes multiple improvements:

Application name parameter

Added applicationName parameter that will also be used to distinguish base-path for different clients allowing multiple clients to be used in one application. Based on https://github.com/OpenAPITools/openapi-generator/issues/11150.

Swagger annotations parameter

Changed the swagger annotations version to swagger2 (io.swagger.core.v3:swagger-annotations). The version can be configured using the generateSwaggerAnnotations option that supports values true (equivalent to swagger2), false, swagger1, swagger2. By default no annotations are generated for client and swagger2 for server. This supports what is requested in https://github.com/OpenAPITools/openapi-generator/issues/12223 (with just supplying the value false).

Operations generated only for first tag

Added option to generate operations only for first tag. The issue is described in detail in https://github.com/OpenAPITools/openapi-generator/issues/12224. The default behavior is to generate operation for each tag, so for definition

paths:
  /configureProfile:
    get:
      operationId: configureProfile
      # ...
      tags: [users, management]

the operation configureProfile will be repeated twice (once in Users and once in Management). This can be avoided by setting the generateOperationOnlyForFirstTag=true. By default it is set to true for server and false for client.

Sample, Docs generation, and tests

Ran:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh

Tested the generation locally.

@wing328 @mshannongit

Java technical committee: @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/andriy-dmytruk/micronaut-dev-4