Added definitions for the wishlist

This commit is contained in:
Luis Alvarez
2020-10-26 10:34:52 -05:00
parent 610d456f13
commit 23a36d0826
3 changed files with 158 additions and 21 deletions

View File

@@ -8,7 +8,7 @@ const fetch = require('node-fetch')
const swaggerToTS = require('@manifoldco/swagger-to-ts').default
async function getSchema(filename) {
const url = `https://next-api.stoplight.io/projects/8433/files/${filename}?ref=version%2F1.3`
const url = `https://next-api.stoplight.io/projects/8433/files/${filename}`
const res = await fetch(url)
if (!res.ok) {
@@ -19,9 +19,12 @@ async function getSchema(filename) {
}
const schemas = Object.entries({
'../api/definitions/catalog.ts': 'BigCommerce_Catalog_API.oas2.yml',
'../api/definitions/catalog.ts':
'BigCommerce_Catalog_API.oas2.yml?ref=version%2F20.930',
'../api/definitions/store-content.ts':
'BigCommerce_Store_Content_API.oas2.yml',
'BigCommerce_Store_Content_API.oas2.yml?ref=version%2F20.930',
'../api/definitions/wishlist.ts':
'BigCommerce_Wishlist_API.oas2.yml?ref=version%2F20.930',
// swagger-to-ts is not working for the schema of the cart API
// '../api/definitions/cart.ts':
// 'BigCommerce_Server_to_Server_Cart_API.oas2.yml',