Skip to content

Commit

Permalink
Regenerate junit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
macisamuele committed Feb 4, 2020
1 parent 52ca9f7 commit 26cfafe
Show file tree
Hide file tree
Showing 6 changed files with 278 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* 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.InlineResponse200
import com.yelp.codegen.generatecodesamples.models.ModelWithOnlyTitle
import com.yelp.codegen.generatecodesamples.models.ModelWithOnlyXModel
import com.yelp.codegen.generatecodesamples.models.ModelWithXModelAndTitle
import io.reactivex.Single
import retrofit2.http.GET
import retrofit2.http.Headers

@JvmSuppressWildcards
interface ModelNameCheckApi {
/**
* The endpoint is owned by junittests service owner
*/
@Headers(
"X-Operation-ID: getInlinedModelWithNoNames"
)
@GET("/model_name/no_x-model_or_title")
fun getInlinedModelWithNoNames(): Single<InlineResponse200>

/**
* The endpoint is owned by junittests service owner
*/
@Headers(
"X-Operation-ID: getInlinedModelWithTitleOnly"
)
@GET("/model_name/title_only")
fun getInlinedModelWithTitleOnly(): Single<ModelWithOnlyTitle>

/**
* The endpoint is owned by junittests service owner
*/
@Headers(
"X-Operation-ID: getInlinedModelWithXModelAndTitle"
)
@GET("/model_name/x-model_and_title")
fun getInlinedModelWithXModelAndTitle(): Single<ModelWithXModelAndTitle>

/**
* The endpoint is owned by junittests service owner
*/
@Headers(
"X-Operation-ID: getInlinedModelWithXModelOnly"
)
@GET("/model_name/x-model_only")
fun getInlinedModelWithXModelOnly(): Single<ModelWithOnlyXModel>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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.models

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
*
* @property noXmodelNoTitle
*/
@JsonClass(generateAdapter = true)
data class InlineResponse200(
@Json(name = "no_xmodel_no_title") @field:Json(name = "no_xmodel_no_title") var noXmodelNoTitle: InlineResponse200.NoXmodelNoTitleEnum? = null
) {
/**
*
* Values: VAL1, VAL2
*/
@JsonClass(generateAdapter = false)
enum class NoXmodelNoTitleEnum(val value: String) {
@Json(name = "val1") VAL1("val1"),
@Json(name = "val2") VAL2("val2")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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.models

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
*
* @property titleOnly
*/
@JsonClass(generateAdapter = true)
data class ModelWithOnlyTitle(
@Json(name = "title_only") @field:Json(name = "title_only") var titleOnly: ModelWithOnlyTitle.TitleOnlyEnum? = null
) {
/**
*
* Values: VAL1, VAL2
*/
@JsonClass(generateAdapter = false)
enum class TitleOnlyEnum(val value: String) {
@Json(name = "val1") VAL1("val1"),
@Json(name = "val2") VAL2("val2")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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.models

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
*
* @property xmodelOnly
*/
@JsonClass(generateAdapter = true)
data class ModelWithOnlyXModel(
@Json(name = "xmodel_only") @field:Json(name = "xmodel_only") var xmodelOnly: ModelWithOnlyXModel.XmodelOnlyEnum? = null
) {
/**
*
* Values: VAL1, VAL2
*/
@JsonClass(generateAdapter = false)
enum class XmodelOnlyEnum(val value: String) {
@Json(name = "val1") VAL1("val1"),
@Json(name = "val2") VAL2("val2")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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.models

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
*
* @property xmodelAndTitle
*/
@JsonClass(generateAdapter = true)
data class ModelWithXModelAndTitle(
@Json(name = "xmodel_and_title") @field:Json(name = "xmodel_and_title") var xmodelAndTitle: ModelWithXModelAndTitle.XmodelAndTitleEnum? = null
) {
/**
*
* Values: VAL1, VAL2
*/
@JsonClass(generateAdapter = false)
enum class XmodelAndTitleEnum(val value: String) {
@Json(name = "val1") VAL1("val1"),
@Json(name = "val2") VAL2("val2")
}
}
108 changes: 108 additions & 0 deletions samples/junit-tests/src/main/java/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,114 @@
]
}
},
"/model_name/no_x-model_or_title": {
"get": {
"operationId": "getInlinedModelWithNoNames",
"parameters": [],
"responses": {
"200": {
"description": "The expected model name is InlineResponse200 (generated by codegen)",
"schema": {
"properties": {
"no_xmodel_no_title": {
"enum": [
"val1",
"val2"
],
"type": "string"
}
},
"type": "object"
}
}
},
"tags": [
"model_name_check"
]
}
},
"/model_name/title_only": {
"get": {
"operationId": "getInlinedModelWithTitleOnly",
"parameters": [],
"responses": {
"200": {
"description": "The expected model name is ModelWithOnlyTitle (title attribute)",
"schema": {
"properties": {
"title_only": {
"enum": [
"val1",
"val2"
],
"type": "string"
}
},
"title": "ModelWithOnlyTitle",
"type": "object"
}
}
},
"tags": [
"model_name_check"
]
}
},
"/model_name/x-model_and_title": {
"get": {
"operationId": "getInlinedModelWithXModelAndTitle",
"parameters": [],
"responses": {
"200": {
"description": "The expected model name is ModelWithXModelAndTitle (x-model attribute)",
"schema": {
"properties": {
"xmodel_and_title": {
"enum": [
"val1",
"val2"
],
"type": "string"
}
},
"title": "ThisShouldBeIgnored",
"type": "object",
"x-model": "ModelWithXModelAndTitle"
}
}
},
"tags": [
"model_name_check"
]
}
},
"/model_name/x-model_only": {
"get": {
"operationId": "getInlinedModelWithXModelOnly",
"parameters": [],
"responses": {
"200": {
"description": "The expected model name is ModelWithOnlyXModel (x-model attribute)",
"schema": {
"properties": {
"xmodel_only": {
"enum": [
"val1",
"val2"
],
"type": "string"
}
},
"type": "object",
"x-model": "ModelWithOnlyXModel"
}
}
},
"tags": [
"model_name_check"
]
}
},
"/nested_additional_properties": {
"get": {
"operationId": "get_nested_additional_properties",
Expand Down

0 comments on commit 26cfafe

Please sign in to comment.