versly/wsdoc

multiple "uriParameters" occurrences in a single resource

balthorium opened this issue · 0 comments

The following JAX-RS endpoint definitions:

    /**
     * This endpoint creates things.
     * @param id1 The widget identifier.
     */
    @RequestMapping(value = "widgets/{id1}/gizmos", method = RequestMethod.POST)
    public void createThing(@PathVariable("id1") String id1) {
    }

    /**
     * This endpoint gets things.
     * @param id1 The widget identifier.
     * @param id2 The gizmo identifier.
     */
    @RequestMapping(value = "widgets/{id1}/gizmos/{id2}", method = RequestMethod.GET)
    public void getThing(@PathVariable("id1") String id1, @PathVariable("id2") String id2) {
    }

    /**
     * This endpoint Deletes things.
     * @param id1 The widget identifier.
     * @param id2 The gizmo identifier.
     */
    @RequestMapping(value = "widgets/{id1}/gizmos/{id2}", method = RequestMethod.DELETE)
    public void deleteThing(@PathVariable("id1") String id1, @PathVariable("id2") String id2) {
    }

result in the following RAML encoding

/mount/widgets/{id1}/gizmos:
    uriParameters:
        id1:
            description: |
                The widget identifier.
            type: string
    post:
        description: |
             This endpoint creates things.
        queryParameters:
        responses:
            200:
    /{id2}:
        uriParameters:
            id2:
                description: |
                    The gizmo identifier.
                type: string
        get:
            description: |
                 This endpoint gets things.
            queryParameters:
            responses:
                200:
        uriParameters:                                                                                                     
            id2:
                description: |
                    The gizmo identifier.
                type: string
        delete:
            description: |
                 This endpoint Deletes things.
            queryParameters:
            responses:
                200:

which is not valid RAML due to the multiple occurrences of "uriParameters" under the "/{id2}" resource.