Skip to content

Commit

Permalink
use jakarta packages (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
inponomarev authored Nov 16, 2023
1 parent b9c5187 commit 37c9343
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public class Car extends Vehicle {
}
```

This will procude the following in Kotlin:
This will produce the following in Kotlin:

```kotlin
//Vehicle.kt
Expand Down
4 changes: 2 additions & 2 deletions 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.31</version>
<version>2.00</version>
<packaging>maven-plugin</packaging>

<name>OpenAPI codegen Maven Plugin</name>
Expand Down Expand Up @@ -120,7 +120,7 @@
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.83</version>
<version>10.1.15</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/curs/hurdygurdy/JavaAPIExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.springframework.web.bind.annotation.RequestPart;

import javax.lang.model.element.Modifier;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Stream;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/curs/hurdygurdy/KotlinAPIExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import io.swagger.v3.oas.models.parameters.Parameter
import io.swagger.v3.oas.models.parameters.RequestBody
import org.springframework.web.bind.annotation.*
import java.util.*
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.reflect.KClass
import kotlin.streams.asSequence

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ru/curs/hurdygurdy/KotlinTypeDefiner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ class KotlinTypeDefiner internal constructor(

val param = ParameterSpec.builder("additionalProperties", mapType)
.defaultValue("HashMap()")
.addAnnotation(JsonAnySetter::class.java)
.addAnnotation(JsonAnySetter::class)
.addAnnotation(
AnnotationSpec.builder(JsonAnyGetter::class)
.useSiteTarget(AnnotationSpec.UseSiteTarget.GET)
Expand All @@ -339,7 +339,7 @@ class KotlinTypeDefiner internal constructor(
private fun oneOfToInterface(schema: Schema<*>, openAPI: OpenAPI, classBuilder: TypeSpec.Builder) {
if (schema.oneOf != null) {
val builder = AnnotationSpec.builder(JsonSubTypes::class)
val subtypes = schema.oneOf.asSequence()
schema.oneOf.asSequence()
.map { it.`$ref` }
.filterNotNull()
.map { referencedTypeName(it, openAPI) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
/com/example/controller/Controller.java
package com.example.controller;

import jakarta.servlet.http.HttpServletResponse;
import java.lang.String;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;

interface Controller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.example.controller;

import com.example.dto.ToveDTO;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.example.controller;

import com.example.dto.RunWorkflowRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ package com.example.controller;
import com.example.dto.DatabaseConnectionRequest;
import com.example.dto.MenuDTO;
import com.example.dto.NullableType;
import jakarta.servlet.http.HttpServletResponse;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
package com.example.controller;

import com.example.dto.PlayerActivitiesDTO;
import jakarta.servlet.http.HttpServletResponse;
import java.lang.Integer;
import java.lang.String;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
Expand Down Expand Up @@ -45,7 +45,7 @@ interface Controller {
package com.example.controller;

import com.example.dto.PlayersDTO;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.example.controller;

import com.example.collector.api.dto.LicenseResponse;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;

interface LicenseController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
/com/example/controller/Controller.java
package com.example.controller;

import jakarta.servlet.http.HttpServletResponse;
import java.lang.String;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;

interface Controller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
package com.example.controller;

import com.example.dto.BuildBundleElement;
import jakarta.servlet.http.HttpServletResponse;
import java.lang.String;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/com/example/controller/Controller.kt
package com.example.controller

import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.String
import org.springframework.web.bind.`annotation`.GetMapping

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.example.controller

import com.example.dto.ToveDTO
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.Int
import org.springframework.web.bind.`annotation`.GetMapping
import org.springframework.web.bind.`annotation`.PathVariable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.example.controller

import com.example.dto.RunWorkflowRequest
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import org.springframework.web.bind.`annotation`.PostMapping
import org.springframework.web.bind.`annotation`.RequestPart
import org.springframework.web.multipart.MultipartFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package com.example.controller
import com.example.dto.DatabaseConnectionRequest
import com.example.dto.MenuDTO
import com.example.dto.NullableType
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.Boolean
import kotlin.Int
import kotlin.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.example.controller

import com.example.dto.PlayerActivitiesDTO
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.Int
import kotlin.String
import org.springframework.web.bind.`annotation`.GetMapping
Expand Down Expand Up @@ -49,7 +49,7 @@ public interface Controller {
package com.example.controller

import com.example.dto.PlayersDTO
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import org.springframework.web.bind.`annotation`.PostMapping
import org.springframework.web.bind.`annotation`.RequestBody

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package com.example.controller

import com.example.dto.CreateUpdateUserRequest
import com.example.dto.UserResponse
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.Long
import kotlin.collections.List
import org.springframework.web.bind.`annotation`.DeleteMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.example.controller

import com.example.collector.api.dto.LicenseResponse
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import org.springframework.web.bind.`annotation`.GetMapping

public interface LicenseController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/com/example/controller/Controller.kt
package com.example.controller

import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.String
import org.springframework.web.bind.`annotation`.GetMapping

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/com/example/controller/Controller.kt
package com.example.controller

import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.String
import org.springframework.web.bind.`annotation`.GetMapping

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.example.controller

import com.example.dto.BuildBundleElement
import javax.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpServletResponse
import kotlin.String
import org.springframework.web.bind.`annotation`.GetMapping
import org.springframework.web.bind.`annotation`.PathVariable
Expand Down

0 comments on commit 37c9343

Please sign in to comment.