Hi, is ther any documentation about how to generat...
# talk-kratos
o
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
our schema generation is currently a multi-step process, see the
make sdk
task for some details
👍 1
o
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
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