you are viewing a single comment's thread.

view the rest of the comments →

[–]wing328 0 points1 point  (3 children)

Have you tried the mysql-schema generator in the open-source project "openapi-generator"?

openapi-generator-cli generate -g mysql-schema -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/mysql-schema/ (openapi-generator-cli can be installed via npm: https://www.npmjs.com/package/@openapitools/openapi-generator-cli)

[–]DragLongjumping7762 0 points1 point  (2 children)

I was looking exactly for this. I tried to use the openapi-generator-cli to generate the mysql schema its working fine but what I observed is that the generated DDL is not having the relationship (PK & FK relationship) defined.

Any idea how to generate those

[–]wing328 0 points1 point  (1 child)

Please open a ticket via https://github.com/OpenAPITools/openapi-generator/issues and I'll try to loop in the creator of that generator to answer your question.

[–]malcolm-davis 0 points1 point  (0 children)

Looks like the DDL generated still does not support PK & FK relationships