@goast/kotlin 0.5.9-beta.1 → 0.5.9-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,6 @@ import okhttp3.RequestBody
14
14
  import okhttp3.RequestBody.Companion.asRequestBody
15
15
  import okhttp3.RequestBody.Companion.toRequestBody
16
16
  import okhttp3.ResponseBody
17
- import okhttp3.internal.EMPTY_REQUEST
18
17
  import java.io.File
19
18
  import java.net.URLConnection
20
19
  import java.time.LocalDate
@@ -106,7 +105,7 @@ open class ApiClient(@API_CLIENT_PARAMETERS@) {
106
105
 
107
106
  mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") ->
108
107
  if (content == null) {
109
- EMPTY_REQUEST
108
+ ByteArray(0).toRequestBody(null)
110
109
  } else {
111
110
  objectMapper.writeValueAsString(content)
112
111
  .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goast/kotlin",
3
- "version": "0.5.9-beta.1",
3
+ "version": "0.5.9-beta.2",
4
4
  "description": "Provides gOAst generators for generating Kotlin code from OpenAPI specifications.",
5
5
  "author": {
6
6
  "name": "Marc Schmidt (MaSch0212)",
@@ -31,4 +31,4 @@
31
31
  "@types/node": "^20.9.0"
32
32
  },
33
33
  "_generatedBy": "dnt@dev"
34
- }
34
+ }