Closed jimmymcpeter closed 1 month ago
Ah interesting. We always the full path in the operations instead in servers :)
Do you fancy raising a pull request for this?
Thanks for reporting this, @jimmymcpeter! I've reviewed your PR, I think we're almost there.
This has been released in v0.2.1!
Make sure to always update to the latest version (npm i @mswjs/source@latest
) to get the newest features and bug fixes.
Predictable release automation by @ossjs/release.
Description
The subdirectory on a Server Object’s url field is getting cut off.
from-open-api.ts#L55-L57
Reproduction steps
api-schema.json
The requestUrl const =
https://example.com/api/v1/whoAmI
Expected behavior
The requestUrl const should =
https://example.com/web/api/v1/whoAmI
Initial assessment
The path should be appended to the Server Object’s url field in order to construct the full URL. Calling
new URL()
is how it's getting cut off.Screenshots