Skip to main content

Here is the route definition:

 

/products/approvedStates:

  get:

    queryParameters:

      issueStateAbbreviation:

        type: USStateAbbreviation

        required: false

    responses:

      200:

        body:

          application/json:

            type: ApprovedStatesOutput

      400:

        body:

          application/json:

            example:

              "Invalid state abbreviation."

 

USStateAbbreviation:

type: string

enum:

- AL

- AK

 

Activating the mocking service and providing one of the enum values (via dropdown) for the endpoint returns the following:

{

"code": "REQUEST_VALIDATION_ERROR",

"message": "Error validating parameter: expected type: JSONObject, found: String"

}

4 件の回答
  1. 2020年5月7日 16:08

    Lalit--

     

    That works for me, too.

     

    We are trying to use libraries instead of defining all the types in the root file.

     

    That is what appears to be causing the issue.

     

    Do you have any comments on the use of libraries in the root file and the Mocking Service?

0/9000