Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Prism and version URLs #103

Closed
lfolco opened this issue Nov 19, 2021 · 4 comments
Closed

Prism and version URLs #103

lfolco opened this issue Nov 19, 2021 · 4 comments
Labels
type: bug bug in the library

Comments

@lfolco
Copy link

lfolco commented Nov 19, 2021

I am trying to use Prism as a mock server for testing. I am running it like so:

prism mock https://raw.githubusercontent.com/sendgrid/sendgrid-oai/main/oai_v3_stoplight.json

The issue is, the when I use the SendGrid PHP library to call it, it's expecting to see a url prefixed with v3, so I am getting errors:

post /v3/mail/send ✖  error     Request terminated with error: https://stoplight.io/prism/errors#NO_PATH_MATCHED_ERROR: Route not resolved, no path matched

Sorry if this is the wrong forum to ask this, wasn't sure if I should ask here or https://github.com/sendgrid/sendgrid-php.

@shwetha-manvinkurke
Copy link
Contributor

Hi @lfolco, the v3 spec is still a WIP and we are aware of the said issue. Have you tried bumping down the prism version to 2.x.x and try mocking with oai_stoplight.json instead?

@shwetha-manvinkurke shwetha-manvinkurke added status: waiting for feedback waiting for feedback from the submitter type: question question directed at the library labels Nov 19, 2021
@lfolco
Copy link
Author

lfolco commented Nov 19, 2021

I'm not seeing the ability to install Prism below v3, any idea of when this could be resolved? 2.x is quite old.

@wadethemaker
Copy link

Hi @lfolco, as @shwetha-manvinkurke noted, v3 is still a work in progress, and some more changes are coming soon. It looks like we're missing the servers array to set a base path in the spec. We've noted it and hope to have a fix out soon. Thanks for calling it to our attention.

@shwetha-manvinkurke shwetha-manvinkurke added status: work in progress Twilio or the community is in the process of implementing and removed status: waiting for feedback waiting for feedback from the submitter labels Jan 24, 2022
@childish-sambino
Copy link
Contributor

Fixed by #112

@childish-sambino childish-sambino added type: bug bug in the library and removed type: question question directed at the library status: work in progress Twilio or the community is in the process of implementing labels Mar 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug bug in the library
Projects
None yet
Development

No branches or pull requests

4 participants