We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Swagger/OpenAPI definition:
Objective: type: object properties: objective_id: type: string objective_name: type: string objective_start: type: string objective_end: type: string reason: type: string
Swagger-Editor configuration options: Using the online demo at editor.swagger.io
If my json is objective_id, the variable generated for kotlin by swagger will be objectiveId, so the request won't happen.
what I'd like to happen is for swager's codegen to define moshi's json fields
What happens
/** * * @param objectiveId * @param objectiveName * @param objectiveStart * @param objectiveEnd * @param reason */ data class Objective ( val objectiveId: kotlin.String? = null, val objectiveName: kotlin.String? = null, val objectiveStart: kotlin.String? = null, val objectiveEnd: kotlin.String? = null, val reason: kotlin.String? = null, ) { }
Possible Solution
/** * * @param objectiveId * @param objectiveName * @param objectiveStart * @param objectiveEnd * @param reason */ @JsonClass(generateAdapter = true) data class CompletedSession( @Json(name = "objective_id") @field:Json(name = "objective_id") var objectiveId: String? = null, @Json(name = "objective_name") @field:Json(name = "objective_name") var objectiveName: String? = null, @Json(name = "objective_start") @field:Json(name = "objective_start") var objectiveStart: String? = null, @Json(name = "objective_end") @field:Json(name = "objective_end") var objectiveEnd: String? = null, @Json(name = "reason") @field:Json(name = "reason") var reason: String? = null )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Content & configuration
Swagger/OpenAPI definition:
Swagger-Editor configuration options:
Using the online demo at editor.swagger.io
Is your feature request related to a problem?
If my json is objective_id, the variable generated for kotlin by swagger will be objectiveId, so the request won't happen.
Describe the solution you'd like
what I'd like to happen is for swager's codegen to define moshi's json fields
What happens
Possible Solution
The text was updated successfully, but these errors were encountered: