mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 04:07:09 +00:00
[kotlin] Make API classes open (non-final) unless nonPublicApi is used (#22461)
* [kotlin] Make API classes open (non-final) unless nonPublicApi is used By making those classes open, AspectJ can be used to enhance their behavior. I'm not changing kotlin-multiplatform templates, where 'open' was already present before my changes. Closes #22271 * Fail Kotlin sample compilation if API classes stop to be public Serves as a 'regression test'.
This commit is contained in:
@@ -36,7 +36,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
||||
import org.openapitools.client.infrastructure.Success
|
||||
import org.openapitools.client.infrastructure.toMultiValue
|
||||
|
||||
class AuthApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
open class AuthApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val defaultBasePath: String by lazy {
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
||||
import org.openapitools.client.infrastructure.Success
|
||||
import org.openapitools.client.infrastructure.toMultiValue
|
||||
|
||||
class BodyApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
open class BodyApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val defaultBasePath: String by lazy {
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
||||
import org.openapitools.client.infrastructure.Success
|
||||
import org.openapitools.client.infrastructure.toMultiValue
|
||||
|
||||
class FormApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
open class FormApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val defaultBasePath: String by lazy {
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
||||
import org.openapitools.client.infrastructure.Success
|
||||
import org.openapitools.client.infrastructure.toMultiValue
|
||||
|
||||
class HeaderApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
open class HeaderApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val defaultBasePath: String by lazy {
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
||||
import org.openapitools.client.infrastructure.Success
|
||||
import org.openapitools.client.infrastructure.toMultiValue
|
||||
|
||||
class PathApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
open class PathApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val defaultBasePath: String by lazy {
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
||||
import org.openapitools.client.infrastructure.Success
|
||||
import org.openapitools.client.infrastructure.toMultiValue
|
||||
|
||||
class QueryApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
open class QueryApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val defaultBasePath: String by lazy {
|
||||
|
||||
Reference in New Issue
Block a user