1

I am getting errors in Apigee when I try to reference a spec while trying to add a product to the portal. I have seen openApi/Swagger examples where nodes are sometimes wrapped in double-quotes, some in single-quotes, and some with no quotes. I get a message that the yaml/Json is not valid.

Is there a document where it explains when openAPI wants quotes and where it doesn't. I do not like to put in pointless quotes around things.

I am using openAPI version 3.0.3. in Apigee Edge

I've used different OpenAPI spec editors. The Specs editor in Apigee doesn't react to things I feel are incorrect. The Try-Me functionality works. Other editors will highlight different lines. I correct them, then paste them back into the Apigee Specs editor. But then when trying to add the Product to the Portal using a Spec, it tells me that the YAML/JSON is invalid.

I am not sure this is important but this a spec I have written after the proxy was written. I don't know if maybe this is an association issue. Later I'll have another question on how to relate a spec to an existing proxy.

Davidson
  • 1,064
  • 3
  • 20
  • 35
  • It's hard to tell what the problem is without seeing your OpenAPI file, but see if this answer your question - [Do I need quotes for strings in YAML?](https://stackoverflow.com/q/19109912/113116) Consider also contacting Apigee support - maybe your file is valid and the problem is actually on their side. – Helen May 26 '23 at 07:08
  • @Helen, Thank you for the link. Excellent. With over 963 upvotes, I'm going with that. I am going to do a line by line excercise to see if I can isolate the offending line. I'll be back with those results. I prefer having the least amount of visual noise in openApi specs. – Davidson May 27 '23 at 19:56
  • Plus, @Helen, I'll be posting a ticket with Apigee. I'm pretty sure I have everything correct. But need their eyes now to show me where the problem is. – Davidson May 27 '23 at 23:05
  • 1
    I determined that a date field in an example was coded as 'MM\/dd\/yyyy". I also discovered when using double-quotes the escape character "\" is recognized. I removed the back-slashes and it worked. – Davidson Jun 20 '23 at 17:08
  • Additionally, I learned that quotes around the responses codes (i.e. '200','201') are not necessary. 200, 201, etc. works just fine too. – Davidson Jun 30 '23 at 14:03

0 Answers0