Skip to content

Commit

Permalink
fix: avoid name and operationId conflict when creating oas client (#1233
Browse files Browse the repository at this point in the history
)

Signed-off-by: Pat Losoponkul <[email protected]>
  • Loading branch information
patlo-iog committed Jul 1, 2024
1 parent f090554 commit 8fb325c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ object CredentialIssuerEndpoints {
)
.out(jsonBody[CredentialResponse])
.errorOut(credentialEndpointErrorOutput)
.name("issueCredential")
.name("oid4vciIssueCredential")
.summary("Credential Endpoint")
.description(
"""OID for VCI [Credential Endpoint](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-credential-endpoint)""".stripMargin
Expand All @@ -97,7 +97,7 @@ object CredentialIssuerEndpoints {
)
.out(jsonBody[CredentialOfferResponse])
.errorOut(EndpointOutputs.basicFailureAndNotFoundAndForbidden)
.name("createCredentialOffer")
.name("oid4vciCreateCredentialOffer")
.summary("Create a new credential offer")
.description(
"""Create a new credential offer and return a compliant `CredentialOffer` for the holder's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import scala.util.Try
type ExtendedErrorResponse = ErrorResponse | CredentialErrorResponse

object ExtendedErrorResponse {
given schema: Schema[ExtendedErrorResponse] = Schema.schemaForEither[ErrorResponse, CredentialErrorResponse].as
given schema: Schema[ExtendedErrorResponse] =
Schema
.schemaForEither[ErrorResponse, CredentialErrorResponse]
.name(Schema.SName("ExtendedErrorResponse"))
.as
given encoder: JsonEncoder[ExtendedErrorResponse] =
ErrorResponse.encoder
.orElseEither(CredentialErrorResponse.encoder)
Expand Down

0 comments on commit 8fb325c

Please sign in to comment.