-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Improve Kotlin Misk OpenApi Generator #21165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 26 commits
54645dd
cff7dbd
03e9b47
787304a
8888fbe
2e66982
1f56a8f
42aaaef
981d81c
53514b9
3e0077a
cc6d9d5
de78670
b0f96c0
93a5550
f5d4d40
fe76a63
281d61f
8cc1d45
0f6e76c
128a926
b059a74
af99d11
e932986
17124ee
e5ef191
6605164
ad0fd7a
90ea506
cc80a38
a6d9e51
460c807
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
generatorName: kotlin-misk | ||
outputDir: samples/server/petstore/kotlin-misk-config | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/kotlin-misk | ||
validateSpec: false | ||
additionalProperties: | ||
hideGenerationTimestamp: "true" | ||
moduleClassName: "PetStoreModule" | ||
generateStubImplClasses: true | ||
addModelMoshiJsonAnnotation: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ generatorName: kotlin-misk | |
outputDir: samples/server/petstore/kotlin-misk | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe we can delete this one if its not required? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's still tested in the CI: https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/samples-kotlin-server.yaml#L50 why it's not required? |
||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/kotlin-misk | ||
validateSpec: false | ||
additionalProperties: | ||
hideGenerationTimestamp: "true" | ||
moduleClassName: "PetStoreModule" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
README.md | ||
build.gradle.kts | ||
docs/ApiResponse.md | ||
docs/Category.md | ||
docs/Order.md | ||
docs/Pet.md | ||
docs/PetApi.md | ||
docs/StoreApi.md | ||
docs/Tag.md | ||
docs/User.md | ||
docs/UserApi.md | ||
settings.gradle.kts | ||
src/main/kotlin/org/openapitools/server/api/api/PetApiAction.kt | ||
src/main/kotlin/org/openapitools/server/api/api/PetStoreModule.kt | ||
src/main/kotlin/org/openapitools/server/api/api/StoreApiAction.kt | ||
src/main/kotlin/org/openapitools/server/api/api/UserApiAction.kt | ||
src/main/kotlin/org/openapitools/server/api/model/Category.kt | ||
src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt | ||
src/main/kotlin/org/openapitools/server/api/model/Order.kt | ||
src/main/kotlin/org/openapitools/server/api/model/Pet.kt | ||
src/main/kotlin/org/openapitools/server/api/model/Tag.kt | ||
src/main/kotlin/org/openapitools/server/api/model/User.kt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7.14.0-SNAPSHOT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Documentation for OpenAPI Petstore | ||
|
||
<a id="documentation-for-api-endpoints"></a> | ||
## Documentation for API Endpoints | ||
|
||
All URIs are relative to *http://petstore.swagger.io/v2* | ||
|
||
Class | Method | HTTP request | Description | ||
------------ | ------------- | ------------- | ------------- | ||
*PetApi* | [**addPet**](Apis/docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store | ||
*PetApi* | [**deletePet**](Apis/docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet | ||
*PetApi* | [**findPetsByStatus**](Apis/docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status | ||
*PetApi* | [**findPetsByTags**](Apis/docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags | ||
*PetApi* | [**getPetById**](Apis/docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID | ||
*PetApi* | [**updatePet**](Apis/docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet | ||
*PetApi* | [**updatePetWithForm**](Apis/docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data | ||
*PetApi* | [**uploadFile**](Apis/docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image | ||
*StoreApi* | [**deleteOrder**](Apis/docs/StoreApi.md#deleteorder) | **Delete** /store/order/{orderId} | Delete purchase order by ID | ||
*StoreApi* | [**getInventory**](Apis/docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status | ||
*StoreApi* | [**getOrderById**](Apis/docs/StoreApi.md#getorderbyid) | **Get** /store/order/{orderId} | Find purchase order by ID | ||
*StoreApi* | [**placeOrder**](Apis/docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet | ||
*UserApi* | [**createUser**](Apis/docs/UserApi.md#createuser) | **Post** /user | Create user | ||
*UserApi* | [**createUsersWithArrayInput**](Apis/docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array | ||
*UserApi* | [**createUsersWithListInput**](Apis/docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array | ||
*UserApi* | [**deleteUser**](Apis/docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user | ||
*UserApi* | [**getUserByName**](Apis/docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name | ||
*UserApi* | [**loginUser**](Apis/docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system | ||
*UserApi* | [**logoutUser**](Apis/docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session | ||
*UserApi* | [**updateUser**](Apis/docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user | ||
|
||
|
||
<a id="documentation-for-models"></a> | ||
## Documentation for Models | ||
|
||
- [org.openapitools.server.api.model.Category](Models/docs/Category.md) | ||
- [org.openapitools.server.api.model.ModelApiResponse](Models/docs/ModelApiResponse.md) | ||
- [org.openapitools.server.api.model.Order](Models/docs/Order.md) | ||
- [org.openapitools.server.api.model.Pet](Models/docs/Pet.md) | ||
- [org.openapitools.server.api.model.Tag](Models/docs/Tag.md) | ||
- [org.openapitools.server.api.model.User](Models/docs/User.md) | ||
|
||
|
||
<a id="documentation-for-authorization"></a> | ||
## Documentation for Authorization | ||
|
||
|
||
Authentication schemes defined for the API: | ||
<a id="petstore_auth"></a> | ||
### petstore_auth | ||
|
||
- **Type**: OAuth | ||
- **Flow**: implicit | ||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog | ||
- **Scopes**: | ||
- write:pets: modify pets in your account | ||
- read:pets: read your pets | ||
|
||
<a id="api_key"></a> | ||
### api_key | ||
|
||
- **Type**: API key | ||
- **API key parameter name**: api_key | ||
- **Location**: HTTP header | ||
|
Uh oh!
There was an error while loading. Please reload this page.