Andrew Wilson d81b5a37d1
#20883 - Add new Misk Kotlin OpenAPI Generator (#20885)
* first pass

* Fix extra new line

* adding generator file

* Run new.sh script

* Fix template directory and ignore failing tests

* fixing up content type

* adding controller impl

* cleanup interface

* typo

* removing bodytype

* adding protos

* fixing 2

* Fix headerParamsSimple

* removing protos etc.

* fixing imports

* removing commented code

* fixing imports

* fixing return

* fixing file

* adding comment

* remove adminapi

* move to jakarta

* reverting break

* fixing httpMethods

* pushing mediaTypes

* Adds gradle mustache templates

* Setup simple build.gradle.kts

* Adds basic model.mustache for model generation

* fixing summary

* fixing summary 2

* Removes unnecesssary line

* fixing return type

* fixing override

* fixing httpcall

* Delete proto folder creation

* fixing return type

* fixing void return type

* fixing space

* removing reactive

* removing imports

* Fixing spacing

* Fixing tabbing

* fixing headers

* add comment

* Adds unit tests

* cleanup

* Correct getHelp() description

* cleanup 2

* removiing pathParams files

* fixup

* fixup 3

* removing more files

* Adds GitHub Workflow generation

* removing form params as not required

* Adds tests for OptionsProvider

* Renamed file to match

* remove whitespace

* remove whitespace

* adding documentation

* adding documentation

* removing swagger annotations

* adding tests

* Adds Guice Module

* Grab OpenAPI title to generate module name

* Revert "Grab OpenAPI title to generate module name"

This reverts commit 9c9b935f5dbee6e0974ebf66b4f611f107df70c2.

* Update sample

* Removes moduleFileName additional property

* adding tests

* adding tests 2

* adding tests 3

* adding tests 4

* added media types

* re-adding tests

* fixing camelcase

* fixing mediatypes

* default mediatype

* adding validation

* adding validation

* removing swagger

* adding gradle dependency

* adding gradle dependency

* fixing types

* fixing return types

* fixing tests

* final fixes

* tweaks

* fixing file etc.

* Update samples/ folder

* fixing jakarta

* fixing jakarta 2

* fixing impl

* Fix unit tests

* fixing jakarta

* fixing jakarta 2

* final final final changes

* Fix initialization of BigDecimal for default values

* update samples, docs

* fixing RequestHeader

* fixing RequestHeader 2

* fixing RequestHeader 2

* add validateSpec=false

* fix pom version

---------

Co-authored-by: Guido Arnau <guido@squareup.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-03-25 22:43:30 +08:00

3.8 KiB

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)

Documentation for Authorization

Authentication schemes defined for the API: ### 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

    api_key

    • Type: API key
    • API key parameter name: api_key
    • Location: HTTP header