Skip to content

Instantly share code, notes, and snippets.

@eug-L
Last active September 17, 2024 08:58
Show Gist options
  • Save eug-L/c850dbb09e7ef00f899399a0094405c2 to your computer and use it in GitHub Desktop.
Save eug-L/c850dbb09e7ef00f899399a0094405c2 to your computer and use it in GitHub Desktop.
google-sheet-query-spec.yml
openapi: "3.0.0"
info:
version: 1.0.0
title: Google Sheet Query API
description: >
This API retrieves product descriptions based on code
license:
name: MIT
servers:
- url: https://script.google.com/macros/s/AKfycbxgfIQLxFm41oUJDWdUKG9I1Txks9quigdkXucThX6XruZOu-MJS3tRIzsIYmFVgo9i
paths:
/exec:
post:
summary: Retrieve product details based on product code
operationId: findProductsByCode
parameters:
- in: query
name: query
schema:
type: string
minLength : 3
required: true
description: Code to look up products. Performs a partial match. Minimum of 3 characters
responses:
'200':
description: Found products
content:
application/json:
schema:
type: object
properties :
total:
type: number
description : Total number of that match the provided code
entries:
type: array
items:
type: object
properties:
code:
type: string
example: "A123"
name:
type: string
example: "Example Name"
description:
type: string
example : "Product A123 is very awesome"
'400':
description: Missing parameters
content:
application/json:
schema:
type: object
properties:
status:
type: string
message:
type: string
example:
status: error
message: Missing parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment