Skip to content

Commit e4e1b32

Browse files
committed
Fix P2 issues: ensure useTags default works and README shows full paths
1 parent 331fa37 commit e4e1b32

3 files changed

Lines changed: 22 additions & 22 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ public void setReturnContainer(final String returnContainer) {
785785

786786
@Override
787787
public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map<String, List<CodegenOperation>> operations) {
788-
if (Objects.equals(library, Constants.JAXRS_SPEC) && additionalProperties.containsKey(USE_TAGS) && !useTags) {
788+
if (Objects.equals(library, Constants.JAXRS_SPEC) && !useTags) {
789789
String basePath = StringUtils.substringBefore(StringUtils.removeStart(resourcePath, "/"), "/");
790790
if (!StringUtils.isEmpty(basePath)) {
791791
co.subresourceOperation = !co.path.isEmpty();

modules/openapi-generator/src/main/resources/kotlin-server/README.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ All URIs are relative to *{{{basePath}}}*
3535

3636
Class | Method | HTTP request | Description
3737
------------ | ------------- | ------------- | -------------
38-
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}}
38+
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{#commonPath}}{{commonPath}}{{/commonPath}}{{path}} | {{{summary}}}
3939
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
4040
{{/generateApiDocs}}
4141

samples/server/petstore/kotlin-server/jaxrs-spec/README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,26 @@ All URIs are relative to *http://petstore.swagger.io/v2*
3434

3535
Class | Method | HTTP request | Description
3636
------------ | ------------- | ------------- | -------------
37-
*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** | Add a new pet to the store
38-
*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /{petId} | Deletes a pet
39-
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /findByStatus | Finds Pets by status
40-
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /findByTags | Finds Pets by tags
41-
*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /{petId} | Find pet by ID
42-
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** | Update an existing pet
43-
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /{petId} | Updates a pet in the store with form data
44-
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /{petId}/uploadImage | uploads an image
45-
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /order/{orderId} | Delete purchase order by ID
46-
*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /inventory | Returns pet inventories by status
47-
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /order/{orderId} | Find purchase order by ID
48-
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /order | Place an order for a pet
49-
*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** | Create user
50-
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /createWithArray | Creates list of users with given input array
51-
*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /createWithList | Creates list of users with given input array
52-
*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /{username} | Delete user
53-
*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /{username} | Get user by user name
54-
*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /login | Logs user into the system
55-
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /logout | Logs out current logged in user session
56-
*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /{username} | Updated user
37+
*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
38+
*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
39+
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
40+
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
41+
*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
42+
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
43+
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
44+
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
45+
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
46+
*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
47+
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
48+
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
49+
*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user
50+
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
51+
*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
52+
*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
53+
*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
54+
*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
55+
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
56+
*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
5757

5858

5959
<a id="documentation-for-models"></a>

0 commit comments

Comments
 (0)