Skip to content

Commit a36ac21

Browse files
committed
Generate samples code.
1 parent 97ddb8a commit a36ac21

27 files changed

Lines changed: 1458 additions & 0 deletions

File tree

  • samples/client
    • echo_api/kotlin-jvm-okhttp/src/main/kotlin/org/openapitools/client/infrastructure
    • others
      • kotlin-integer-enum/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-jvm-okhttp-non-ascii-headers/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-jvm-okhttp-parameter-tests/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-jvm-okhttp-path-comments/src/main/kotlin/org/openapitools/client/infrastructure
    • petstore
      • kotlin-allOf-discriminator-kotlinx-serialization/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-allOf-discriminator/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-array-integer-enum/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-array-simple-string-jvm-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-bigdecimal-default-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-default-values-jvm-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-explicit/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-name-parameter-mappings/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin/src/main/kotlin/org/openapitools/client/infrastructure

samples/client/echo_api/kotlin-jvm-okhttp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,60 @@ open class ApiClient(val baseUrl: String, val client: Call.Factory = defaultClie
4444
protected const val OCTET_MEDIA_TYPE: String = "application/octet-stream"
4545
protected const val TEXT_MEDIA_TYPE: String = "text/plain"
4646

47+
@Deprecated(
48+
message = "Please use the capitalized constant `CONTENT_TYPE` instead.",
49+
replaceWith = ReplaceWith("CONTENT_TYPE")
50+
)
51+
protected const val ContentType: String = CONTENT_TYPE
52+
53+
@Deprecated(
54+
message = "Please use the capitalized constant `ACCEPT` instead.",
55+
replaceWith = ReplaceWith("ACCEPT")
56+
)
57+
protected const val Accept: String = ACCEPT
58+
59+
@Deprecated(
60+
message = "Please use the capitalized constant `AUTHORIZATION` instead.",
61+
replaceWith = ReplaceWith("AUTHORIZATION")
62+
)
63+
protected const val Authorization: String = AUTHORIZATION
64+
65+
@Deprecated(
66+
message = "Please use the capitalized constant `JSON_MEDIA_TYPE` instead.",
67+
replaceWith = ReplaceWith("JSON_MEDIA_TYPE")
68+
)
69+
protected const val JsonMediaType: String = JSON_MEDIA_TYPE
70+
71+
@Deprecated(
72+
message = "Please use the capitalized constant `FORM_DATA_MEDIA_TYPE` instead.",
73+
replaceWith = ReplaceWith("FORM_DATA_MEDIA_TYPE")
74+
)
75+
protected const val FormDataMediaType: String = FORM_DATA_MEDIA_TYPE
76+
77+
@Deprecated(
78+
message = "Please use the capitalized constant `FORM_URL_ENC_MEDIA_TYPE` instead.",
79+
replaceWith = ReplaceWith("FORM_URL_ENC_MEDIA_TYPE")
80+
)
81+
protected const val FormUrlEncMediaType: String = FORM_URL_ENC_MEDIA_TYPE
82+
83+
@Deprecated(
84+
message = "Please use the capitalized constant `XML_MEDIA_TYPE` instead.",
85+
replaceWith = ReplaceWith("XML_MEDIA_TYPE")
86+
)
87+
protected const val XmlMediaType: String = XML_MEDIA_TYPE
88+
89+
@Deprecated(
90+
message = "Please use the capitalized constant `OCTET_MEDIA_TYPE` instead.",
91+
replaceWith = ReplaceWith("OCTET_MEDIA_TYPE")
92+
)
93+
protected const val OctetMediaType: String = OCTET_MEDIA_TYPE
94+
95+
@Deprecated(
96+
message = "Please use the capitalized constant `TEXT_MEDIA_TYPE` instead.",
97+
replaceWith = ReplaceWith("TEXT_MEDIA_TYPE")
98+
)
99+
protected const val TextMediaType: String = TEXT_MEDIA_TYPE
100+
47101
val apiKey: MutableMap<String, String> = mutableMapOf()
48102
val apiKeyPrefix: MutableMap<String, String> = mutableMapOf()
49103
var username: String? = null

samples/client/others/kotlin-integer-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,60 @@ open class ApiClient(val baseUrl: String, val client: Call.Factory = defaultClie
4444
protected const val OCTET_MEDIA_TYPE: String = "application/octet-stream"
4545
protected const val TEXT_MEDIA_TYPE: String = "text/plain"
4646

47+
@Deprecated(
48+
message = "Please use the capitalized constant `CONTENT_TYPE` instead.",
49+
replaceWith = ReplaceWith("CONTENT_TYPE")
50+
)
51+
protected const val ContentType: String = CONTENT_TYPE
52+
53+
@Deprecated(
54+
message = "Please use the capitalized constant `ACCEPT` instead.",
55+
replaceWith = ReplaceWith("ACCEPT")
56+
)
57+
protected const val Accept: String = ACCEPT
58+
59+
@Deprecated(
60+
message = "Please use the capitalized constant `AUTHORIZATION` instead.",
61+
replaceWith = ReplaceWith("AUTHORIZATION")
62+
)
63+
protected const val Authorization: String = AUTHORIZATION
64+
65+
@Deprecated(
66+
message = "Please use the capitalized constant `JSON_MEDIA_TYPE` instead.",
67+
replaceWith = ReplaceWith("JSON_MEDIA_TYPE")
68+
)
69+
protected const val JsonMediaType: String = JSON_MEDIA_TYPE
70+
71+
@Deprecated(
72+
message = "Please use the capitalized constant `FORM_DATA_MEDIA_TYPE` instead.",
73+
replaceWith = ReplaceWith("FORM_DATA_MEDIA_TYPE")
74+
)
75+
protected const val FormDataMediaType: String = FORM_DATA_MEDIA_TYPE
76+
77+
@Deprecated(
78+
message = "Please use the capitalized constant `FORM_URL_ENC_MEDIA_TYPE` instead.",
79+
replaceWith = ReplaceWith("FORM_URL_ENC_MEDIA_TYPE")
80+
)
81+
protected const val FormUrlEncMediaType: String = FORM_URL_ENC_MEDIA_TYPE
82+
83+
@Deprecated(
84+
message = "Please use the capitalized constant `XML_MEDIA_TYPE` instead.",
85+
replaceWith = ReplaceWith("XML_MEDIA_TYPE")
86+
)
87+
protected const val XmlMediaType: String = XML_MEDIA_TYPE
88+
89+
@Deprecated(
90+
message = "Please use the capitalized constant `OCTET_MEDIA_TYPE` instead.",
91+
replaceWith = ReplaceWith("OCTET_MEDIA_TYPE")
92+
)
93+
protected const val OctetMediaType: String = OCTET_MEDIA_TYPE
94+
95+
@Deprecated(
96+
message = "Please use the capitalized constant `TEXT_MEDIA_TYPE` instead.",
97+
replaceWith = ReplaceWith("TEXT_MEDIA_TYPE")
98+
)
99+
protected const val TextMediaType: String = TEXT_MEDIA_TYPE
100+
47101
val apiKey: MutableMap<String, String> = mutableMapOf()
48102
val apiKeyPrefix: MutableMap<String, String> = mutableMapOf()
49103
var username: String? = null

samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,60 @@ open class ApiClient(val baseUrl: String, val client: Call.Factory = defaultClie
4444
protected const val OCTET_MEDIA_TYPE: String = "application/octet-stream"
4545
protected const val TEXT_MEDIA_TYPE: String = "text/plain"
4646

47+
@Deprecated(
48+
message = "Please use the capitalized constant `CONTENT_TYPE` instead.",
49+
replaceWith = ReplaceWith("CONTENT_TYPE")
50+
)
51+
protected const val ContentType: String = CONTENT_TYPE
52+
53+
@Deprecated(
54+
message = "Please use the capitalized constant `ACCEPT` instead.",
55+
replaceWith = ReplaceWith("ACCEPT")
56+
)
57+
protected const val Accept: String = ACCEPT
58+
59+
@Deprecated(
60+
message = "Please use the capitalized constant `AUTHORIZATION` instead.",
61+
replaceWith = ReplaceWith("AUTHORIZATION")
62+
)
63+
protected const val Authorization: String = AUTHORIZATION
64+
65+
@Deprecated(
66+
message = "Please use the capitalized constant `JSON_MEDIA_TYPE` instead.",
67+
replaceWith = ReplaceWith("JSON_MEDIA_TYPE")
68+
)
69+
protected const val JsonMediaType: String = JSON_MEDIA_TYPE
70+
71+
@Deprecated(
72+
message = "Please use the capitalized constant `FORM_DATA_MEDIA_TYPE` instead.",
73+
replaceWith = ReplaceWith("FORM_DATA_MEDIA_TYPE")
74+
)
75+
protected const val FormDataMediaType: String = FORM_DATA_MEDIA_TYPE
76+
77+
@Deprecated(
78+
message = "Please use the capitalized constant `FORM_URL_ENC_MEDIA_TYPE` instead.",
79+
replaceWith = ReplaceWith("FORM_URL_ENC_MEDIA_TYPE")
80+
)
81+
protected const val FormUrlEncMediaType: String = FORM_URL_ENC_MEDIA_TYPE
82+
83+
@Deprecated(
84+
message = "Please use the capitalized constant `XML_MEDIA_TYPE` instead.",
85+
replaceWith = ReplaceWith("XML_MEDIA_TYPE")
86+
)
87+
protected const val XmlMediaType: String = XML_MEDIA_TYPE
88+
89+
@Deprecated(
90+
message = "Please use the capitalized constant `OCTET_MEDIA_TYPE` instead.",
91+
replaceWith = ReplaceWith("OCTET_MEDIA_TYPE")
92+
)
93+
protected const val OctetMediaType: String = OCTET_MEDIA_TYPE
94+
95+
@Deprecated(
96+
message = "Please use the capitalized constant `TEXT_MEDIA_TYPE` instead.",
97+
replaceWith = ReplaceWith("TEXT_MEDIA_TYPE")
98+
)
99+
protected const val TextMediaType: String = TEXT_MEDIA_TYPE
100+
47101
val apiKey: MutableMap<String, String> = mutableMapOf()
48102
val apiKeyPrefix: MutableMap<String, String> = mutableMapOf()
49103
var username: String? = null

samples/client/others/kotlin-jvm-okhttp-parameter-tests/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,60 @@ open class ApiClient(val baseUrl: String, val client: Call.Factory = defaultClie
4444
protected const val OCTET_MEDIA_TYPE: String = "application/octet-stream"
4545
protected const val TEXT_MEDIA_TYPE: String = "text/plain"
4646

47+
@Deprecated(
48+
message = "Please use the capitalized constant `CONTENT_TYPE` instead.",
49+
replaceWith = ReplaceWith("CONTENT_TYPE")
50+
)
51+
protected const val ContentType: String = CONTENT_TYPE
52+
53+
@Deprecated(
54+
message = "Please use the capitalized constant `ACCEPT` instead.",
55+
replaceWith = ReplaceWith("ACCEPT")
56+
)
57+
protected const val Accept: String = ACCEPT
58+
59+
@Deprecated(
60+
message = "Please use the capitalized constant `AUTHORIZATION` instead.",
61+
replaceWith = ReplaceWith("AUTHORIZATION")
62+
)
63+
protected const val Authorization: String = AUTHORIZATION
64+
65+
@Deprecated(
66+
message = "Please use the capitalized constant `JSON_MEDIA_TYPE` instead.",
67+
replaceWith = ReplaceWith("JSON_MEDIA_TYPE")
68+
)
69+
protected const val JsonMediaType: String = JSON_MEDIA_TYPE
70+
71+
@Deprecated(
72+
message = "Please use the capitalized constant `FORM_DATA_MEDIA_TYPE` instead.",
73+
replaceWith = ReplaceWith("FORM_DATA_MEDIA_TYPE")
74+
)
75+
protected const val FormDataMediaType: String = FORM_DATA_MEDIA_TYPE
76+
77+
@Deprecated(
78+
message = "Please use the capitalized constant `FORM_URL_ENC_MEDIA_TYPE` instead.",
79+
replaceWith = ReplaceWith("FORM_URL_ENC_MEDIA_TYPE")
80+
)
81+
protected const val FormUrlEncMediaType: String = FORM_URL_ENC_MEDIA_TYPE
82+
83+
@Deprecated(
84+
message = "Please use the capitalized constant `XML_MEDIA_TYPE` instead.",
85+
replaceWith = ReplaceWith("XML_MEDIA_TYPE")
86+
)
87+
protected const val XmlMediaType: String = XML_MEDIA_TYPE
88+
89+
@Deprecated(
90+
message = "Please use the capitalized constant `OCTET_MEDIA_TYPE` instead.",
91+
replaceWith = ReplaceWith("OCTET_MEDIA_TYPE")
92+
)
93+
protected const val OctetMediaType: String = OCTET_MEDIA_TYPE
94+
95+
@Deprecated(
96+
message = "Please use the capitalized constant `TEXT_MEDIA_TYPE` instead.",
97+
replaceWith = ReplaceWith("TEXT_MEDIA_TYPE")
98+
)
99+
protected const val TextMediaType: String = TEXT_MEDIA_TYPE
100+
47101
val apiKey: MutableMap<String, String> = mutableMapOf()
48102
val apiKeyPrefix: MutableMap<String, String> = mutableMapOf()
49103
var username: String? = null

samples/client/others/kotlin-jvm-okhttp-path-comments/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,60 @@ open class ApiClient(val baseUrl: String, val client: Call.Factory = defaultClie
4444
protected const val OCTET_MEDIA_TYPE: String = "application/octet-stream"
4545
protected const val TEXT_MEDIA_TYPE: String = "text/plain"
4646

47+
@Deprecated(
48+
message = "Please use the capitalized constant `CONTENT_TYPE` instead.",
49+
replaceWith = ReplaceWith("CONTENT_TYPE")
50+
)
51+
protected const val ContentType: String = CONTENT_TYPE
52+
53+
@Deprecated(
54+
message = "Please use the capitalized constant `ACCEPT` instead.",
55+
replaceWith = ReplaceWith("ACCEPT")
56+
)
57+
protected const val Accept: String = ACCEPT
58+
59+
@Deprecated(
60+
message = "Please use the capitalized constant `AUTHORIZATION` instead.",
61+
replaceWith = ReplaceWith("AUTHORIZATION")
62+
)
63+
protected const val Authorization: String = AUTHORIZATION
64+
65+
@Deprecated(
66+
message = "Please use the capitalized constant `JSON_MEDIA_TYPE` instead.",
67+
replaceWith = ReplaceWith("JSON_MEDIA_TYPE")
68+
)
69+
protected const val JsonMediaType: String = JSON_MEDIA_TYPE
70+
71+
@Deprecated(
72+
message = "Please use the capitalized constant `FORM_DATA_MEDIA_TYPE` instead.",
73+
replaceWith = ReplaceWith("FORM_DATA_MEDIA_TYPE")
74+
)
75+
protected const val FormDataMediaType: String = FORM_DATA_MEDIA_TYPE
76+
77+
@Deprecated(
78+
message = "Please use the capitalized constant `FORM_URL_ENC_MEDIA_TYPE` instead.",
79+
replaceWith = ReplaceWith("FORM_URL_ENC_MEDIA_TYPE")
80+
)
81+
protected const val FormUrlEncMediaType: String = FORM_URL_ENC_MEDIA_TYPE
82+
83+
@Deprecated(
84+
message = "Please use the capitalized constant `XML_MEDIA_TYPE` instead.",
85+
replaceWith = ReplaceWith("XML_MEDIA_TYPE")
86+
)
87+
protected const val XmlMediaType: String = XML_MEDIA_TYPE
88+
89+
@Deprecated(
90+
message = "Please use the capitalized constant `OCTET_MEDIA_TYPE` instead.",
91+
replaceWith = ReplaceWith("OCTET_MEDIA_TYPE")
92+
)
93+
protected const val OctetMediaType: String = OCTET_MEDIA_TYPE
94+
95+
@Deprecated(
96+
message = "Please use the capitalized constant `TEXT_MEDIA_TYPE` instead.",
97+
replaceWith = ReplaceWith("TEXT_MEDIA_TYPE")
98+
)
99+
protected const val TextMediaType: String = TEXT_MEDIA_TYPE
100+
47101
val apiKey: MutableMap<String, String> = mutableMapOf()
48102
val apiKeyPrefix: MutableMap<String, String> = mutableMapOf()
49103
var username: String? = null

samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,60 @@ open class ApiClient(val baseUrl: String, val client: Call.Factory = defaultClie
4545
protected const val OCTET_MEDIA_TYPE: String = "application/octet-stream"
4646
protected const val TEXT_MEDIA_TYPE: String = "text/plain"
4747

48+
@Deprecated(
49+
message = "Please use the capitalized constant `CONTENT_TYPE` instead.",
50+
replaceWith = ReplaceWith("CONTENT_TYPE")
51+
)
52+
protected const val ContentType: String = CONTENT_TYPE
53+
54+
@Deprecated(
55+
message = "Please use the capitalized constant `ACCEPT` instead.",
56+
replaceWith = ReplaceWith("ACCEPT")
57+
)
58+
protected const val Accept: String = ACCEPT
59+
60+
@Deprecated(
61+
message = "Please use the capitalized constant `AUTHORIZATION` instead.",
62+
replaceWith = ReplaceWith("AUTHORIZATION")
63+
)
64+
protected const val Authorization: String = AUTHORIZATION
65+
66+
@Deprecated(
67+
message = "Please use the capitalized constant `JSON_MEDIA_TYPE` instead.",
68+
replaceWith = ReplaceWith("JSON_MEDIA_TYPE")
69+
)
70+
protected const val JsonMediaType: String = JSON_MEDIA_TYPE
71+
72+
@Deprecated(
73+
message = "Please use the capitalized constant `FORM_DATA_MEDIA_TYPE` instead.",
74+
replaceWith = ReplaceWith("FORM_DATA_MEDIA_TYPE")
75+
)
76+
protected const val FormDataMediaType: String = FORM_DATA_MEDIA_TYPE
77+
78+
@Deprecated(
79+
message = "Please use the capitalized constant `FORM_URL_ENC_MEDIA_TYPE` instead.",
80+
replaceWith = ReplaceWith("FORM_URL_ENC_MEDIA_TYPE")
81+
)
82+
protected const val FormUrlEncMediaType: String = FORM_URL_ENC_MEDIA_TYPE
83+
84+
@Deprecated(
85+
message = "Please use the capitalized constant `XML_MEDIA_TYPE` instead.",
86+
replaceWith = ReplaceWith("XML_MEDIA_TYPE")
87+
)
88+
protected const val XmlMediaType: String = XML_MEDIA_TYPE
89+
90+
@Deprecated(
91+
message = "Please use the capitalized constant `OCTET_MEDIA_TYPE` instead.",
92+
replaceWith = ReplaceWith("OCTET_MEDIA_TYPE")
93+
)
94+
protected const val OctetMediaType: String = OCTET_MEDIA_TYPE
95+
96+
@Deprecated(
97+
message = "Please use the capitalized constant `TEXT_MEDIA_TYPE` instead.",
98+
replaceWith = ReplaceWith("TEXT_MEDIA_TYPE")
99+
)
100+
protected const val TextMediaType: String = TEXT_MEDIA_TYPE
101+
48102
val apiKey: MutableMap<String, String> = mutableMapOf()
49103
val apiKeyPrefix: MutableMap<String, String> = mutableMapOf()
50104
var username: String? = null

0 commit comments

Comments
 (0)