Skip to content
This repository was archived by the owner on Jan 11, 2019. It is now read-only.
This repository was archived by the owner on Jan 11, 2019. It is now read-only.

Read default value of a swagger "parameter" object and populate the relevant request parameter value. #66

@wxdave

Description

@wxdave

Example swagger given below. The goal is to read the value foovalue specified for the default parameter of foo, assuming default is in a logical location.

paths:
  /foo-path:
    parameters:
      - $ref: '#/parameters/foo'
    get:
      description: Get a foo    
...
definitions:
...

parameters:
  foo:
    name: foo
    in: query
    required: true
    type: string
    default: foovalue

This would require some magic in AbstractSwagger1XImporter.groovy, assuming complex types (object) would need to be handled in some way. (see line 119 in the below image).

image

The result is that the query parameter's value is populated for all requests (swagger paths) that reference the parameter, as shown below.

image

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