Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple "uriParameters" occurrences in a single resource #29

Open
balthorium opened this issue Nov 5, 2014 · 0 comments
Open

multiple "uriParameters" occurrences in a single resource #29

balthorium opened this issue Nov 5, 2014 · 0 comments

Comments

@balthorium
Copy link
Contributor

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.

balthorium added a commit to balthorium/wsdoc that referenced this issue Nov 5, 2014
balthorium added a commit to balthorium/wsdoc that referenced this issue Nov 5, 2014
…e doesn't produce uriParameters markup in any case.
pcl added a commit that referenced this issue Nov 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant