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

Create template for Micronaut-based java server side application #429

Closed
franz-see opened this issue Jul 22, 2019 · 5 comments
Closed

Create template for Micronaut-based java server side application #429

franz-see opened this issue Jul 22, 2019 · 5 comments

Comments

@franz-see
Copy link
Contributor

Add the ability to create micronaut-based server side java application given an open api spec.

franz-see added a commit to franz-see/swagger-codegen-generators that referenced this issue Jul 22, 2019
franz-see added a commit to franz-see/swagger-codegen-generators that referenced this issue Jul 22, 2019
@franz-see
Copy link
Contributor Author

franz-see commented Jul 23, 2019

FYI: I have created a standalone project for now so that I can use it myself without waiting for it to be merged into swagger-codegen-generators :)

https://github.com/franz-see/swagger-codegen-micronaut-generator

@HugoMario
Copy link
Contributor

hey @franz-see ping me anytime you need a PR for being merge :)

@HugoMario
Copy link
Contributor

@franz-see i tried your PR and found a few errors:

using this yaml document

it is common to say in many operations' annotations a double comma: ,, like this:

@Operation(summary = "Create user", operationId = "createUser", description = "This can only be done by the logged in user.", tags={ "user", })
    @ApiResponse(responseCode = "200", description = "successful operation")
    @Post(value = "/user",,
        consumes = { "application/json" }
        )
    default Single<HttpResponse<Void>> createUser(
          @Parameter(description = "Created user object", required = true ) @Valid @Body User body  
  ) {
        return Single.fromCallable(() -> {
            throw new UnsupportedOperationException();
        });
    }

Authorization and AuthorizationScope are not imported. About this points i wanted to ask you if you have planned use security from micronaut too?

It would be nice to have on README file a guide about how to run the generated code.

Let me know what you think about it, and if you need help, please give me write access on your fork and i will be really glad to help :)

@HugoMario
Copy link
Contributor

changes have been merged, closing this out.

@mbm56767
Copy link

mbm56767 commented Nov 11, 2020

@franz-see i tried your PR and found a few errors:

using this yaml document

it is common to say in many operations' annotations a double comma: ,, like this:

@Operation(summary = "Create user", operationId = "createUser", description = "This can only be done by the logged in user.", tags={ "user", })
    @ApiResponse(responseCode = "200", description = "successful operation")
    @Post(value = "/user",,
        consumes = { "application/json" }
        )
    default Single<HttpResponse<Void>> createUser(
          @Parameter(description = "Created user object", required = true ) @Valid @Body User body  
  ) {
        return Single.fromCallable(() -> {
            throw new UnsupportedOperationException();
        });
    }

Authorization and AuthorizationScope are not imported. About this points i wanted to ask you if you have planned use security from micronaut too?

It would be nice to have on README file a guide about how to run the generated code.

Let me know what you think about it, and if you need help, please give me write access on your fork and i will be really glad to help :)

I am still facing the issues mentioned here.
a double comma: ,, is seen in the generated micronaut code
Authorization, AuthorizationScope, MultipartFile and required are not imported
due to these issues, i am not able run the generated micronaut code using the MainApplication class.
Attaching the screenshots

image

image

i have followed the ref: https://github.com/franz-see/swagger-codegen-micronaut-generator for generating the micronaut code from swagger file.
Can someone help me to resolve these issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants