-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from nielsvanvelzen/openapi-request-body-types
Fix generator ignoring non-json request body types
- Loading branch information
Showing
5 changed files
with
76 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 16 additions & 9 deletions
25
openapi-generator/src/main/kotlin/org/jellyfin/openapi/constants/MimeType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
package org.jellyfin.openapi.constants | ||
|
||
object MimeType { | ||
const val APPLICATION_ALL_PLUS_JSON = "application/*+json" | ||
const val APPLICATION_JSON = "application/json" | ||
const val APPLICATION_OCTET_STREAM = "application/octet-stream" | ||
const val APPLICATION_X_JAVASCRIPT = "application/x-javascript" | ||
const val APPLICATION_X_MPEG_URL = "application/x-mpegURL" | ||
const val AUDIO_ALL = "audio/*" | ||
const val FONT_ALL = "font/*" | ||
const val IMAGE_ALL = "image/*" | ||
const val TEXT_ALL = "text/*" | ||
const val TEXT_PLAIN = "text/plain" | ||
const val TEXT_CSS = "text/css" | ||
const val TEXT_XML = "text/xml" | ||
const val TEXT_HTML = "text/html" | ||
const val IMAGE_ALL = "image/*" | ||
const val AUDIO_ALL = "audio/*" | ||
const val TEXT_JSON = "text/json" | ||
const val TEXT_PLAIN = "text/plain" | ||
const val TEXT_XML = "text/xml" | ||
const val VIDEO_ALL = "video/*" | ||
const val FONT_ALL = "font/*" | ||
const val APPLICATION_X_JAVASCRIPT = "application/x-javascript" | ||
const val APPLICATION_X_MPEG_URL = "application/x-mpegURL" | ||
const val APPLICATION_OCTET_STREAM = "application/octet-stream" | ||
const val APPLICATION_JSON = "application/json" | ||
|
||
/** | ||
* Array of duplicated JSON mime types in the OpenAPI specification generated by the Jellyfin server. | ||
*/ | ||
val IGNORED_JSON_TYPES = arrayOf(TEXT_JSON, APPLICATION_ALL_PLUS_JSON) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters