-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to specify custom class names for OpenAPI and AsyncAPI schemas #985
Conversation
…I and AsyncAPI docs
publishOperationId: (Vector[String], Endpoint[_, _, _, _]) => String | ||
subscribeOperationId: (Vector[String], Endpoint[_, _, _, _]) => String, | ||
publishOperationId: (Vector[String], Endpoint[_, _, _, _]) => String, | ||
schemaObjectInfoToNameMapper: SObjectInfo => String = SObjectInfo.defaultToNameMapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe let's use a simpler name - I think just schemaName
would be sufficient, the rest is obvious from the type signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected
@@ -73,6 +73,10 @@ object SchemaType { | |||
case class SObjectInfo(fullName: String, typeParameterShortNames: List[String] = Nil) | |||
object SObjectInfo { | |||
val Unit: SObjectInfo = SObjectInfo(fullName = "Unit") | |||
val defaultToNameMapper: SObjectInfo => String = info => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only used for openapi/asyncapi generation, so I'd keep that code for use only in these modules. Maybe the package object sttp.tapir.docs.apispec
would be a good place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected
Thank you! |
No description provided.