mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 22:50:53 +00:00
Minor enhancements to the MySQL generator (#1148)
* minor enhancements to the mysql generator * add ybelenko to the README
This commit is contained in:
parent
e4b5f50515
commit
3a5ec0a69d
@ -46,7 +46,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go**, **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), Scalatra)
|
||||
**API documentation generators** | **HTML**, **Confluence Wiki**
|
||||
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
||||
**Others** | **JMeter**
|
||||
**Others** | **JMeter**, **MySQL Schema**
|
||||
|
||||
## Table of contents
|
||||
|
||||
@ -603,6 +603,8 @@ Here is a list of template creators:
|
||||
* Confluence Wiki: @jhitchcock
|
||||
* Configuration
|
||||
* Apache2: @stkrwork
|
||||
* Schema
|
||||
* MySQL: @ybelenko
|
||||
|
||||
#### How to join the core team
|
||||
|
||||
|
@ -26,7 +26,7 @@ then
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/mysql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples/schema/petstore/mysql $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
10
bin/windows/mysql-schema-petstore.bat
Executable file
10
bin/windows/mysql-schema-petstore.bat
Executable file
@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples\schema\petstore\mysql
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
@ -322,7 +322,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
|
||||
columnDefinition.put("colDataType", "ENUM");
|
||||
columnDefinition.put("colDataTypeArguments", columnDataTypeArguments);
|
||||
} else {
|
||||
if (dataFormat == "int64") {
|
||||
if ("int64".equals(dataFormat)) {
|
||||
columnDefinition.put("colDataType", "BIGINT");
|
||||
} else {
|
||||
Long min = (minimum != null) ? Long.parseLong(minimum) : null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user