Files
Piotr Kubowicz 7b83462a83 [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'.
2025-12-01 00:03:29 +08:00
..
2025-10-30 01:25:35 +08:00

org.openapitools.client - Kotlin client library for OpenAPI Petstore

Test for issue 4062

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version:
  • Generator version: 7.18.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.KotlinClientCodegen

Requires

  • Kotlin 2.2.20
  • Gradle 8.14

Build

First, create the gradle wrapper script:

gradle wrapper

Then, run:

./gradlew check assemble

This runs all tests and packages the library.

Features/Implementation Notes

  • Supports JSON inputs/outputs, File inputs, and Form inputs.
  • Supports collection formats for query parameters: csv, tsv, ssv, pipes.
  • Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions.
  • Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets.

Documentation for API Endpoints

All URIs are relative to http://petstore.swagger.io/v2

Class Method HTTP request Description
EnumApi getEnum GET /enum Get enums

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.