portman icon indicating copy to clipboard operation
portman copied to clipboard

Feature Request - warn when an invalid openApiOperationId is specified

Open jpjpjp opened this issue 1 year ago • 2 comments

I recently discovered that some of the tests I thought I had written weren't being created. After some investigation, I realized that the OperationId I specified didn't match what was in my spec.

In my case I had a variation test that looked something like this:

version: 1.0
tests:
  integrationTests:
    - name: /categories tests
       operations:
         - openApiOperationId: updateCategoryById
            openApiResponse: '200'
            variations:

Since my spec file didn't have an updateCategoryById none of the tests specified in this section got generated.

It would be nice if Portman would generate a warning, or even outright fail when it can't find a specified OpenAPIOperationId

Thanks for your consideration!

jpjpjp avatar Aug 16 '24 03:08 jpjpjp

hi @jpjpjp

Would this be something you had in mind for the warning? image

Question: what would be the default? That this warning is displayed or only when the --warn parameter is included?

thim81 avatar Sep 28 '24 16:09 thim81

Yes. This would be really helpful to catch mistakes!

jpjpjp avatar Sep 29 '24 00:09 jpjpjp

hi @jpjpjp

We just released version 1.30.5 of Portman, which includes the warning when a target does not exist in the OpenAPI spec. Let us know if you have improvements or ideas.

Closing this feature request as completed.

thim81 avatar Nov 01 '24 09:11 thim81