Open
Conversation
Del-S
reviewed
May 10, 2021
|
|
||
| ### Added: | ||
| - (Kotlin) Add a new parameter `generateApi` you can enable/disable to generate API with infrastructure. | ||
| If you set it to false, only model classes will be generated. |
Contributor
There was a problem hiding this comment.
If you set it to false api classes will not be generated. Model to nijak neovlivňuje. Pokud bys pak měl i proměnnou na model tak tohle už nebude pravda protože generateApi != generateModel.
Del-S
reviewed
May 10, 2021
| - `dateLibrary` - By this property you can set date library used to serialize dates and times. | ||
| - `enumPropertyNaming` - By this property you can change enum property naming style. ("camelCase", "PascalCase", "snake_case", "original", "UPPERCASE") | ||
| - `generateInfrastructure` - By this property you can enable to generate API infrastructure. | ||
| - `generateApi` - By this property you can enable/disable to generate API with infrastructure. If you set to false, only a model classes will be generated. |
Contributor
There was a problem hiding this comment.
Technicky by to asi měl být i enum. API_INFRA, API, NOTHING. :) Ale nevím jestli se dají enumy poslílat přes tuhle konfiguraci.
Del-S
reviewed
May 10, 2021
| * Additional generator options: | ||
| * - `dateLibrary` - By this property you can set date library used to serialize dates and times. | ||
| * - `generateInfrastructure` - By this property you can enable to generate API infrastructure. | ||
| * - `generateApi` - By this property you can enable/disable to generate API with infrastructure. If you set to false, only a model classes will be generated. Default is true |
Del-S
reviewed
May 10, 2021
| if (!generateApi) { | ||
| apiDocTemplateFiles.clear() | ||
| apiTemplateFiles.clear() | ||
| if (additionalProperties.containsKey(GENERATE_API)) { |
Contributor
There was a problem hiding this comment.
Asi nechápu ale není tahle kontrola zbytečná? To máš obražené v tom generateApi = řádku.
Del-S
reviewed
May 10, 2021
| additionalProperties[DateLibrary.THREETENBP_LOCALDATETIME.value] = false | ||
| typeMapping["local-date-time"] = "kotlinx.datetime.LocalDateTime" | ||
| typeMapping["date-time"] = "kotlinx.datetime.LocalDateTime" | ||
| typeMapping["DateTime"] = "LocalDateTime" |
Contributor
There was a problem hiding this comment.
Kotlinx nemá pouze DateTime? Se mi zdá celkem naprd.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
generateApiyou can enable/disable to generate API with infrastructure.If you set it to false, only model classes will be generated.