Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Micronaut server generator #10270

Merged
merged 12 commits into from
Jan 26, 2022
Merged

Conversation

andriy-dmytruk
Copy link
Contributor

Description

Adds server implementation using Micronaut framework.

Changes to folder structure in the modules/open-api-generator/src/main/resources/java-micronaut folder in order to retain some common client and server features and splitting others - (common, client, server) folders.

Tasks

  • Added generator class
  • Registered class in SPI file modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig, verified that build does not fail ./mvnw clean package
  • Added test class in modules/openapi-generator/src/test
  • Created config ./bin/configs/java-micronaut-server.yaml
  • Generated samples with ./bin/generate-samples.sh, verified that all test pass with ./mvnw package integration-test -P "java-micronaut-client,java-micronaut-server,-openapi-generator
  • Generated docs ./bin/utils/export_docs_generators.sh

Mentions

@nyilmaz
Copy link

nyilmaz commented Oct 12, 2021

@andriy-dmytruk tested with this pr, found 2 issues,

  1. in those files:

params/beanValidation.mustache
model/beanValidation.mustache

@Email annotation should be proceeded with a single space, otherwise code is generated like;

@EmailString

  1. controller.mustache has unused import:

import io.micronaut.http.client.annotation.Client;

@andriy-dmytruk
Copy link
Contributor Author

@nyilmaz Thanks for the info. I will make corrections accordingly.

@andriy-dmytruk andriy-dmytruk marked this pull request as ready for review January 19, 2022 23:25
@pbthorste
Copy link
Contributor

This is a very interesting PR - what is needed to get it merged ?

@wing328
Copy link
Member

wing328 commented Jan 26, 2022

Tested locally and the result is good.

@wing328 wing328 merged commit a0dd025 into OpenAPITools:master Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants