Skip to content

Conversation

@vsouhrada
Copy link
Contributor

  • (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.

@vsouhrada vsouhrada added the enhancement New feature or request label May 10, 2021
@vsouhrada vsouhrada requested a review from Del-S May 10, 2021 12:23

### 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

- `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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opět model bych nezmiňoval.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

* 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opět model.

if (!generateApi) {
apiDocTemplateFiles.clear()
apiTemplateFiles.clear()
if (additionalProperties.containsKey(GENERATE_API)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asi nechápu ale není tahle kontrola zbytečná? To máš obražené v tom generateApi = řádku.

additionalProperties[DateLibrary.THREETENBP_LOCALDATETIME.value] = false
typeMapping["local-date-time"] = "kotlinx.datetime.LocalDateTime"
typeMapping["date-time"] = "kotlinx.datetime.LocalDateTime"
typeMapping["DateTime"] = "LocalDateTime"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kotlinx nemá pouze DateTime? Se mi zdá celkem naprd.

@Del-S Del-S assigned vsouhrada and unassigned Del-S May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants