-
-
Notifications
You must be signed in to change notification settings - Fork 7k
MySQL Schema Generator #1055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL Schema Generator #1055
Conversation
b584c9e
to
c93b487
Compare
Now we faced Animal:
type: object
discriminator: className
required:
- className
properties:
className:
type: string
color:
type: string
default: 'red' will produce: CREATE TABLE IF NOT EXISTS `Animal` (
`className` TEXT NOT NULL,
`color` TEXT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
c3911e0
to
e827910
Compare
...api-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaServerCodegen.java
Outdated
Show resolved
Hide resolved
...api-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaServerCodegen.java
Outdated
Show resolved
Hide resolved
...api-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaServerCodegen.java
Outdated
Show resolved
Hide resolved
...api-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaServerCodegen.java
Outdated
Show resolved
Hide resolved
About the CI failures, it seems like some Java docstrings have minor issues:
To repeat that locally, please try |
e827910
to
ca7d384
Compare
ca7d384
to
bd82f89
Compare
@ybelenko thanks again for the new generator, which is included in the v3.3.0 minor release: https://twitter.com/oas_generator/status/1046941449609068544 |
* [Mysql Schema] Add new generator * [Mysql Schema] Fix default definition * [Mysql Schema] Add defaultDatabaseName option * [Mysql Schema] Add jsonDataTypeEnabled option * [Mysql Schema] Add samples
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.3.x
,4.0.x
. Default:master
.Description of the PR
I'm happy to finally represent first version of MySQL schema generator. 🎆
Current version is beta, but I need feedback from community asap.
Related discussion about data mapping #955
How to refresh samples
What else I gonna do
defaultDatabaseName
cli optionmysqlSchemaColumnDataTypeDefinition
)DEFAULT
statements generationjsonDataTypeEnabled
whichtrue
by default. When it's disabled, allobject
andarray
data maps toTEXT
data typecc @OpenAPITools/generator-core-team
@wing328 If you think it's appropriate to notify somebody beside core team members to this thread, please do that in a next comment