https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
o

orange-lock-46074

03/30/2022, 10:48 AM
Hi, is ther any documentation about how to generate a client from kratos schema? I can see that there are a few schema files in the repo, I assume that I should generate a client for
openapi.json
in that directory, is that correct? Is there any difference compared to
api.openapi.json
? - how do I know which I should use? This is the files in the repo where I am looking: https://github.com/ory/kratos/tree/master/.schema
I see now that there are also an
sdk
repo with some info.
s

steep-lamp-91158

03/30/2022, 10:58 AM
our schema generation is currently a multi-step process, see the
make sdk
task for some details
👍 1
o

orange-lock-46074

03/30/2022, 11:09 AM
Thanks for the pointer. Looks like two other schema files are used there
spec/swagger.json
and
spec/api.json
- but yes, the process does not look straight forward.
s

steep-lamp-91158

03/30/2022, 11:12 AM
We generate the openapi 2 schema first form comments in the code and then migrate it to v3, that's why in the end we use
spec/api.json
to generate the official clients: https://github.com/ory/kratos/blob/aee2b1ed1189b57fcbb1aaa456444d5121be94b1/Makefile#L104-L111
👍 1
8 Views