Postman Authorization with petstore swagger and Prism

752 Views Asked by At

I've been testing out stoplight prism https://stoplight.io/open-source/prism/ and using a https://petstore.swagger.io/ doc to run my mocks I'm able to use the GET method for /pet and get mocked results back using Prism. The swagger is requesting me to authenticate to use the PUT/UPDATE/DELETE methods.

After authenticating with the steps below. I'm still getting an error:

{
   "type":"https://stoplight.io/prism/errors#NOT_ACCEPTABLE",
   "title":"The server cannot produce a representation for your accept header",
   "status":406,
   "detail":"Unable to find content for application/json"
}

Steps:

  1. https://petstore.swagger.io/
  2. click authorize
  3. I add in a random client_id
  4. then add read and write scopes.
  5. I open my postman and select Authorization and add the following:

enter image description here

I click the Get New Access Token button and click the option to add token.

Then in my headers I add the following: enter image description here

I add raw body enter image description here

When I do my post I get the following error:

{
   "type":"https://stoplight.io/prism/errors#NOT_ACCEPTABLE",
   "title":"The server cannot produce a representation for your accept header",
   "status":406,
   "detail":"Unable to find content for application/json"
}
0

There are 0 best solutions below