Hi, by default openapi-swagger-generator uses /*/ ...
# ktor
b
Hi, by default openapi-swagger-generator uses /*/ for content type but when using swagger with post endpoint it gets unsupported media type error. how can we fix this
a
Can you please describe your problem in more detail?
b
@Aleksei Tirman [JB] sorry for the late response i didnt get the notificaiton. I have a route
Copy code
route("notifications") {
            post {
                val request = call.receive<CreateNotificationRequest>()
                service.createNotification(request)
                call.respond(HttpStatusCode.Created)
            }
}
This route is automatically generated as in openapi doc:
Copy code
paths:
  /notifications:
    post:
      tags:
      - "Notifications"
      description: ""
      requestBody:
        content:
          '*/*':
            schema:
              $ref: "#/components/schemas/CreateNotificationRequest"
        required: true
Problem is
Copy code
content:
          '*/*':
When i try to test this endpoint in swagger i got error, but when i manually update the content to
applitaction/json
it works.
a
This is a bug so I've created an issue (https://youtrack.jetbrains.com/issue/IDEA-331266).
b
Thank you