Hi, it looks like OpenAPI schemas that are used fo...
# general
s
Hi, it looks like OpenAPI schemas that are used for SDK generation are slightly incomplete. Specificaly: https://github.com/ory/sdk/blob/master/spec/kratos/v25.4.0.json I have not tested other yet. I'm trying to produce Swift client for Kratos using https://github.com/apple/swift-openapi-generator, but getting an error of spec validation:
Copy code
openapi.json: error: Inconsistency encountered when parsing `sessionToken` in Document.paths['/self-service/settings'].post.security: Each key found in a Security Requirement dictionary must refer to a Security Scheme present in the Components dictionary.
Error: C:/Users/.../openapi.json: error: Inconsistency encountered when parsing `sessionToken` in Document.paths['/self-service/settings'].post.security: Each key found in a Security Requirement dictionary must refer to a Security Scheme present in the Components dictionary.
That looks valid, as in
securitySchemes
only
oryAccessToken
is described. If I add
sessionToken
scheme, client generation proceeds.
👀 1
According to some online spec validator that is indeed against the OAS rules. https://oas-validation.com
m
Hey @square-eye-77845 thanks for the investigation! Would you be willing to document this in a design doc for Swift client in ory/sdk. I think the team would be very happy if we can also offer a Swift SDK and if there is just one blocker we could probably get it going soon. Creating an issue will help us keep track of it over the holiday season.
s
Sorry its been a very busy week, I've filed it as a feature, as I'm not sure how you will want to approach swift SDK (Elements native? 😉). https://github.com/ory/sdk/issues/457