wkennedy / swagger4spring-web

Swagger support for Spring MVC
89 stars 46 forks source link

Word "document" #69

Closed nicearma closed 9 years ago

nicearma commented 10 years ago

I was trying to use this plugin maven but i had a big problem with the word document in the service, i realy dont know if because this plugin or swagger, but you can test the bug wiith the file DocumentRest.java


@RestController
@RequestMapping(value = "/api/v1/document")
@Api(value = "/api/v1/document", description = "Create Add Document to message")
public class DocumentRest {

    @ApiOperation(value = "Upload Document ",notes = "The message have to exist in the system and the status have to be not sended", httpMethod = "POST", response = String.class)
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public String addDocument(
            @RequestParam(value = "msgId") String msgId,
            @RequestParam(required = false, value = "comment") String comment,
            @RequestParam(required = false, value = "title") String title)
            throws MissingServletRequestParameterException {
        return null;
    }

    @ApiOperation(value = "Create document",notes = "The message have to exist in the system and the status have to be not sended and have the droit to use the template", httpMethod = "POST", response = String.class)
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    public String createDocument(
            @RequestParam(value = "msgId") String msgId) 
            throws IOException,  Exception {
        return null;
    }

if you change the /document for /nicolas all work fine

nicearma commented 10 years ago

I test this with the swagger4springweb-example and putting the file in controllers.api, after some test any /d* seem have problem