Closed tech-bee-10 closed 2 years ago
i’ll check and get back.
@rand-guy can you please post an example. If I do this:
/pets/{id}:
get:
description: Returns a user based on a single ID, if the user does not have access to the pet
operationId: find pet by id
parameters:
- name: id
in: path
description: ID of pet to fetch
required: true
schema:
type: integer
format: int64
example: 78
- name: page
in: query
description: Page number
required: true
schema:
type: string
example: test
It considers the given examples.
Yeah, I tried for the above example. It works fine. For me, the openAPI spec created is having this format.
schema:
type: integer
format: int64
example: 78
Will check how I can update the spec to be able to get the format you mentioned. Thanks.
For request body, if we add examples in schema, generated inputs take the example for generating meaningful inputs. Is there similar way to generate inputs for path/query parameters? I tried adding examples for them but CATS doesn’t generate any test cases using examples values.