Help generating Swagger 2.0 json file?

jparker
Shopify Partner
1 0 0

Hi,  I'm trying to connect to Shopify's API using a Swagger.json file.  Is there an easy way to format the json files provided by Shopify to be Swagger 2.0?

 

This is what I GET when pull in the products.json file.  This is the incorrect format though and when I use http://editor.swagger.io/ I get several schema errors.  I admit I'm a little new to this particular issue but I'm a quick learner so if someone could help me at least head in the right direction I would really appreciate it.

products:
  - id: 8928929029
    title:  Flag T Shirt
    body_html:  Flag T Shirt description of T - Shirt here
    vendor: We Are Historically
    product_type: ''
    created_at: '2017-08-27T14:57:31-07:00'
    handle: flag-t-shirt
    updated_at: '2018-01-28T18:47:42-08:00'
    published_at: null
    template_suffix: null
    published_scope: web
    tags: Flag
    variants:
      - id: 41282327877
        product_id: 8928929029

 

Thanks!

Reply 1 (1)
Alex
Shopify Staff
Shopify Staff
1561 81 338

You will likely be better off asking in the swagger community about this one.. From my experience just messing around with it, the errors are relatively descriptive so it shouldn't be too tricky to work through perhaps with some community input.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog