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

How to remove usingPUT? #146

Closed
klaszlo8207 opened this issue Jan 12, 2021 · 7 comments
Closed

How to remove usingPUT? #146

klaszlo8207 opened this issue Jan 12, 2021 · 7 comments

Comments

@klaszlo8207
Copy link

klaszlo8207 commented Jan 12, 2021

1, How to remove ALL usingPUT/usingPOST/UsingGET1/using* at the end of the suspend fun?

2, How to remove header:

"X-Operation-ID: blabla"?

3, How to generate responses under models/responses and requests under models/requests?

BTW, Thanks for the library!

@klaszlo8207
Copy link
Author

2, is solved

@cortinico
Copy link
Collaborator

1, How to remove ALL usingPUT/usingPOST/UsingGET1/using* at the end of the suspend fun?

Can you provide a sample Swagger file you're using? It's unclear to me what those usingPUT/usingPOST/UsingGET1 are.

3, How to generate responses under models/responses and requests under models/requests?

You can use the outputDir property in your build.gradle file to specify where the output will be placed. However there is no trivial way to specify that responses and requests should be separated (as they're all just models). You can however specify the destination package (and the folder) with the packageName config property.

@klaszlo8207
Copy link
Author

1, solved sorry it was in the spec file: "operationId"

I just simple removed that chars

@klaszlo8207
Copy link
Author

3, What is the class that can I refactor/update to create that two responses/requests directories?

I think this is possible, because we know what is the Request classes and what is the Response classes, so in this way we can seperate it...

@cortinico
Copy link
Collaborator

3, What is the class that can I refactor/update to create that two responses/requests directories?

It's the KotlinGenerator class https://github.com/Yelp/swagger-gradle-codegen/blob/master/gradle-plugin/plugin/src/main/java/com/yelp/codegen/KotlinGenerator.kt

@klaszlo8207
Copy link
Author

Thanks, I will try it

@cortinico
Copy link
Collaborator

I'll close this issue as it's a mixture of questions. Should you need further support on point 3, please open another issue 👌

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

2 participants