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

[Spring][maven-plugin] Change default generated status to NOT_IMPLEMENTED in controller #6445

Closed
M3lkior opened this Issue Sep 6, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@M3lkior
Copy link

M3lkior commented Sep 6, 2017

Description

Code implementation after swagger generation is not immediat in certain team workflow. In my case, i generate controllers sources based on my swagger specs and my developers implements the business code later in the week / or month.

I think it could be fine generating the default implementation with HttpStatus.NOT_IMPLEMENTED:

        return new ResponseEntity<...>(HttpStatus.NOT_IMPLEMENTED);
Swagger-codegen version

2.2.2

Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

I think it could be fine generating the default implementation with HttpStatus.NOT_IMPLEMENTED:

        return new ResponseEntity<...>(HttpStatus.NOT_IMPLEMENTED);
@wing328

This comment has been minimized.

Copy link
Contributor

wing328 commented Sep 8, 2017

Yup, I think so. We've already done something similar for Spring Cloud client:

return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.NOT_IMPLEMENTED){{#async}}){{/async}};

cc @cbornet @ePaul

@cbornet

This comment has been minimized.

Copy link
Contributor

cbornet commented Sep 8, 2017

I think we now have example responses generated. Should we generate with NOT IMPLEMENTED statuts code and the example body ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment