Skip to content

UI doesn't invoke URIs with optional path parameters #54

Closed
@jeffm13

Description

@jeffm13

It looks like the Swagger UI has a problem with hapi-style optional path parameters. With a route defined as:

      /books/{id}/cover

Swagger UI has no trouble at all. It documents the route, and enables me to invoke it from the UI. Great!

But when a parameterized path contains an optional parameter at the end, it has a problem:

    /library/shelves/{shelfId}/book/{id?}

Here it documents the route, including the optional parameter segment. But when I try to execute the from the UI, leaving the optional parameter blank, the UI never invokes the API.

Did I miss something in the documentation? Or is this an issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions