Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -221,27 +221,31 @@ public void processOpts() {

@Override
public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map<String, List<CodegenOperation>> operations) {
String basePath = resourcePath;
if (basePath.startsWith("/")) {
basePath = basePath.substring(1);
}
int pos = basePath.indexOf("/");
if (pos > 0) {
basePath = basePath.substring(0, pos);
}
if(library.equals(DEFAULT_LIBRARY) || library.equals(SPRING_MVC_LIBRARY)) {
String basePath = resourcePath;
if (basePath.startsWith("/")) {
basePath = basePath.substring(1);
}
int pos = basePath.indexOf("/");
if (pos > 0) {
basePath = basePath.substring(0, pos);
}

if (basePath == "") {
basePath = "default";
if (basePath.equals("")) {
basePath = "default";
} else {
co.subresourceOperation = !co.path.isEmpty();
}
List<CodegenOperation> opList = operations.get(basePath);
if (opList == null) {
opList = new ArrayList<CodegenOperation>();
operations.put(basePath, opList);
}
opList.add(co);
co.baseName = basePath;
} else {
co.subresourceOperation = !co.path.isEmpty();
}
List<CodegenOperation> opList = operations.get(basePath);
if (opList == null) {
opList = new ArrayList<CodegenOperation>();
operations.put(basePath, opList);
super.addOperationToGroup(tag, resourcePath, operation, co, operations);
}
opList.add(co);
co.baseName = basePath;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.api;

import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;
Expand All @@ -18,7 +18,7 @@
import java.util.List;


@Api(value = "pet", description = "the pet API")
@Api(value = "Pet", description = "the Pet API")
public interface PetApi {

@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.List;


@Api(value = "store", description = "the store API")
@Api(value = "Store", description = "the Store API")
public interface StoreApi {

@ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.List;


@Api(value = "user", description = "the user API")
@Api(value = "User", description = "the User API")
public interface UserApi {

@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.api;

import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.api;

import io.swagger.model.Client;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.time.LocalDate;
import java.math.BigDecimal;

import io.swagger.annotations.*;
Expand Down Expand Up @@ -71,8 +71,8 @@ default CompletableFuture<ResponseEntity<Void>> testEndpointParameters(@ApiParam
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
@RequestMapping(value = "/fake",
produces = { "application/json" },
consumes = { "application/json" },
produces = { "*/*" },
consumes = { "*/*" },
method = RequestMethod.GET)
default CompletableFuture<ResponseEntity<Void>> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray,
@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.api;

import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import io.swagger.annotations.*;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import io.swagger.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import org.joda.time.DateTime;

import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;
Expand Down Expand Up @@ -63,8 +63,8 @@ ResponseEntity<Void> testEndpointParameters(@ApiParam(value = "None", required=t
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
@RequestMapping(value = "/fake",
produces = { "application/json" },
consumes = { "application/json" },
produces = { "*/*" },
consumes = { "*/*" },
method = RequestMethod.GET)
ResponseEntity<Void> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray,
@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import io.swagger.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import org.joda.time.DateTime;

import io.swagger.annotations.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.api;

import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.api;

import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import io.swagger.annotations.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import io.swagger.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import org.joda.time.DateTime;

import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;
Expand Down Expand Up @@ -63,8 +63,8 @@ ResponseEntity<Void> testEndpointParameters(@ApiParam(value = "None", required=t
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
@RequestMapping(value = "/fake",
produces = { "application/json" },
consumes = { "application/json" },
produces = { "*/*" },
consumes = { "*/*" },
method = RequestMethod.GET)
ResponseEntity<Void> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray,
@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import io.swagger.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import org.joda.time.DateTime;

import io.swagger.annotations.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.api;

import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.api;

import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import io.swagger.annotations.*;

Expand Down