Skip to content

Commit

Permalink
* don't use data object (#232)
Browse files Browse the repository at this point in the history
* update version
  • Loading branch information
inponomarev authored Aug 28, 2023
1 parent 0dba054 commit bb3d3f5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ru.curs</groupId>
<artifactId>hurdy-gurdy</artifactId>
<version>1.29</version>
<version>1.30</version>
<packaging>maven-plugin</packaging>

<name>OpenAPI codegen Maven Plugin</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/curs/hurdygurdy/KotlinTypeDefiner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class KotlinTypeDefiner internal constructor(
schema.oneOf.isNullOrEmpty() &&
!isParent
)
TypeSpec.objectBuilder(name).superclass(baseClass).addModifiers(KModifier.DATA)
TypeSpec.objectBuilder(name).superclass(baseClass)
else if (!schema.oneOf.isNullOrEmpty())
TypeSpec.interfaceBuilder(name)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.`annotation`.JsonNaming

@JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy::class)
public data object C : B()
public object C : B()
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.`annotation`.JsonNaming

@JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy::class)
public data object ClassWithNoFields
public object ClassWithNoFields
---
/com/example/dto/CreateUpdateUserRequest.kt
package com.example.dto
Expand Down

0 comments on commit bb3d3f5

Please sign in to comment.