Skip to content

UI does not render when @ApiImplicitParam has not specified dataType #305

@rgsage

Description

@rgsage

An Api operation with swagger-annotations_2.10-1.3.0 implicit param like this:

@ApiImplicitParams(value = {
        @ApiImplicitParam(
                name = "Authorization",
                paramType = "header",
                value = "blah blah blah",
                required = true
        ),

Generates json like this:

parameters: [
{
    name: "Authorization",
    description: "blah blah blah",
    required: true,
    allowMultiple: false,
    type: "",
    paramType: "header"
},

Which causes the UI to generate empty resource_xyz elements, so clicking on them has no effect.

Adding:

                dataType = "string",

solves the problem. Perhaps the dom generation code could consider string as default type for implicit params? Or the annotation itself could provide a default value? The failure is silent so can take a while to figure out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions