Skip to content

Commit

Permalink
Merge pull request #1 from opticdev/action
Browse files Browse the repository at this point in the history
add debug action
  • Loading branch information
Alexandre-Herve committed Sep 5, 2023
2 parents 496e8ac + 9adc94c commit ecd192c
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/optic_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: optic
on:
pull_request:
push:
branches:
- 'main'

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Optic
run: npm install --location global @useoptic/optic@0.49.7-6

- name: Run Optic
run: OPTIC_ENV=staging OPTIC_TOKEN="oidMDU4MmI1YzQtNTQwMS00YjIxLWI2Y2ItMDFmNGU0ODlkYWI3.ZBWfGe1k1noEvGGcKTtJG.-_KL_7gZsqLqfetE7iLm4" GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} optic run
5 changes: 5 additions & 0 deletions todo-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ paths:
schema:
type: number
required: false
- name: test
in: header
schema:
type: string
required: false
responses:
'200':
description: ok
Expand Down
51 changes: 51 additions & 0 deletions todo-api3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
openapi: 3.0.1
info:
title: TodoAPI
version: "1.1"
paths:
/todos:
get:
parameters:
- name: limit
in: query
schema:
type: number
required: false
- name: test
in: header
schema:
type: number
required: false
responses:
'200':
description: ok
content:
application/json:
schema:
type: object
properties:
todos:
type: array
items:
$ref: "#/components/schemas/TodoRead"
required:
- todos
components:
schemas:
TodoRead:
type: object
properties:
name:
type: string
status:
type: string
created_at:
type: string
example:
type: string
format: date-time
example: "2020-01-01T00:00:00.000Z"
required:
- name
- status
- created_at

0 comments on commit ecd192c

Please sign in to comment.