Skip to content

Commit

Permalink
Upload APIs to Readme platform and add github actions for them
Browse files Browse the repository at this point in the history
  • Loading branch information
joerideg committed Mar 20, 2024
1 parent aef0e8f commit f534f0d
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 18 deletions.
48 changes: 38 additions & 10 deletions .github/workflows/readme.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,43 @@
# For info on getting the latest rdme version and obtaining your API_DEFINITION_ID,
# see our docs: https://docs.readme.com/docs/rdme#example-syncing-an-openapi-definition
name: Sync OAS to ReadMe

on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: readmeio/[email protected]
with:
rdme: openapi discovery/email_spec.yaml --key=${{ secrets.API_KEY_SANDBOX }} --id=${{ secrets.EMAIL_RECS_ID }}

jobs:
rdme-openapi:
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
uses: actions/checkout@v3

- name: Upload Autosuggest API to Readme
uses: readmeio/rdme@v8
with:
rdme: openapi discovery/autosuggest.yaml --key=${{ secrets.README_API_KEY }} --id=${{ secrets.AUTOSUGGEST_ID }}

- name: Upload Bestseller API to Readme
uses: readmeio/rdme@v8
with:
rdme: openapi discovery/bestseller.yaml --key=${{ secrets.README_API_KEY }} --id=${{ secrets.BESTSELLER_ID }}

- name: Upload Content Search API to Readme
uses: readmeio/rdme@v8
with:
rdme: openapi discovery/content-search.yaml --key=${{ secrets.README_API_KEY }} --id=${{ secrets.CONTENT_SEARCH_ID }}

- name: Upload Recommendations & Pathways API to Readme
uses: readmeio/rdme@v8
with:
rdme: openapi discovery/recommendations-pathways.yaml --key=${{ secrets.README_API_KEY }} --id=${{ secrets.RECS_PATHWAYS_ID }}

- name: Upload Search & Category API to Readme
uses: readmeio/rdme@v8
with:
rdme: openapi discovery/search-category.yaml --key=${{ secrets.README_API_KEY }} --id=${{ secrets.SEARCH_CATEGORY_ID }}

- name: Upload Email Widget API to Readme
uses: readmeio/rdme@v8
with:
rdme: openapi discovery/email-spec.yaml --key=${{ secrets.README_API_KEY }} --id=${{ secrets.EMAIL_RECS_ID }}
Empty file removed discovery/README.md
Empty file.
1 change: 0 additions & 1 deletion discovery/content-search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,3 @@ x-readme:
proxy-enabled: true
samples-enabled: true
x-readme-fauxas: true
default: contentskodemo_64ae
15 changes: 14 additions & 1 deletion discovery/recommendations-pathways.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ paths:
Do not use a relative URL. <br><br> The example value shown here, <i>https://www.documentation-site.com</i>,
is included for your convenience to send a request with <b>Try It</b>.
required: true
example: '4500928'
example: https://www.documentation-site.com
schema:
type: string
Expand Down Expand Up @@ -1214,12 +1213,26 @@ paths:
description: ''
operationId: upload-api
deprecated: false
parameters:
- name: widget_id
in: path
required: true
description: The ID of the widget.
schema:
type: string
"/visual/search/{widget_id}":
get:
summary: Visual Search API
description: ''
operationId: visual-search-response-api
deprecated: false
parameters:
- name: widget_id
in: path
required: true
description: The ID of the widget.
schema:
type: string
x-readme:
headers: [ ]
explorer-enabled: true
Expand Down
12 changes: 6 additions & 6 deletions discovery/search-category.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ paths:
convenience to send a request with <b>Try It</b>.
required: true
examples:
product:
value: cable
summary: Search terms
category:
value: PNB160303000000
summary: Category ID
product:
value: cable
summary: Search terms
category:
value: PNB160303000000
summary: Category ID
schema:
type: string
- name: ref_url
Expand Down

0 comments on commit f534f0d

Please sign in to comment.