apideck-libraries / portman

Port OpenAPI Specs to Postman Collections, inject test suite and run via Newman 👨🏽‍🚀
http://getportman.com/
Apache License 2.0
638 stars 59 forks source link

Unable to generate integration tests with colon character in URL #556

Closed samgrant-unity closed 8 months ago

samgrant-unity commented 9 months ago

I attempted to generate some additional integration tests for an API that looks something like the following api/v1/configs:batch-delete with an operationId of deleteConfigBatch however the tool wasn't generating anything and wasn't throwing any errors.

After following the code I believe the problem is with the portman parser here https://github.com/apideck-libraries/portman/blob/main/src/postman/PostmanMappedOperation.ts#L112 - the pathRef value is used to then look up the corresponding operationId https://github.com/apideck-libraries/portman/blob/main/src/application/IntegrationTestWriter.ts#L40-L47 but if the parsed pathRef is missing the : character then that look up is not going to work

thim81 commented 9 months ago

hi @samgrant-unity

We will have to review the normalizedPathRef function, since it is here that ":" is stripped.

thim81 commented 9 months ago

hi @samgrant-unity

We just released version 1.26.3 which includes an improvement to support the : character as part of the URL segment.

Give it a try and let us know if your integration test behaves as expected to close this issue.

thim81 commented 8 months ago

Closing the issue, since it should be resolved.