-
Notifications
You must be signed in to change notification settings - Fork 37
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
data
become `data` in generated code
#147
Comments
Hey @klaszlo8207 |
sample: good code:
generated code:
|
Can you provide also your Swagger file (or the fragment that generated this code)? |
Sorry it is a private swagger |
Can I ask you to create a reproducer (i.e. extract only the fields that are producing the problem and redact the names if needed). |
echoing @cortinico here ... having a sample spec that is able to trigger the issue helps us more to identify the bug, ensure that it get fixed and have a test that ensures that no regressions would be present in upcoming releases. Still by trying to create specs that would create such type of API seems that something like the following might represent a minimal spec swagger: '2.0'
info:
title: Reproduce https://github.com/Yelp/swagger-gradle-codegen/issues/147
version: 0.0.0
paths:
/signin:
post:
operationId: SigninUsingPOST
parameters:
- in: body
name: data
schema:
type: object
x-model: SigninRequest
properties:
p:
type: integer
required: true
responses:
default:
description: ''
schema:
type: object
properties:
p:
type: string
x-model: SignInResponse as it would generate (with the /**
* NOTE: This class is auto generated by the Swagger Gradle Codegen for the following API: JUnit Tests
*
* More info on this tool is available on https://github.com/Yelp/swagger-gradle-codegen
*/
package com.yelp.codegen.generatecodesamples.apis
import com.yelp.codegen.generatecodesamples.models.SignInResponse
import com.yelp.codegen.generatecodesamples.models.SigninRequest
import io.reactivex.Single
import retrofit2.http.Headers
import retrofit2.http.POST
@JvmSuppressWildcards
interface DefaultApi {
/**
* The endpoint is owned by junittests service owner
* @param `data` (required)
*/
@Headers(
"X-Operation-ID: SigninUsingPOST"
)
@POST("/signin")
fun signinUsingPOST(
@retrofit2.http.Body `data`: SigninRequest
): Single<SignInResponse>
} |
…ters name are properly escaped This commit addresses Yelp#147
…ters name are properly escaped This commit addresses Yelp#147 Co-authored-by: Nicola Corti <[email protected]>
Is it now fixed? Can I use the new code somehow from maven new version? 1.4.2? |
It's fixed but will be available in the upcoming version 👍 |
When will be this available? Thanks |
We can't really commit on a timeline, but I'm getting @macisamuele onboard to finalize |
please replace ` to `
The text was updated successfully, but these errors were encountered: