Skip to content

Commit fdf709e

Browse files
author
Stefan Wille
committed
Add spec
1 parent be86db1 commit fdf709e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

myapi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
openapi: 3.0.0
2+
info:
3+
version: 1.0.0
4+
title: My API
5+
description: An OpenAPI example API
6+
paths:
7+
/posts:
8+
get:
9+
description: Returns all posts
10+
responses:
11+
'200':
12+
description: Successful response
13+
14+

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"web-vitals": "^1.0.1"
1919
},
2020
"scripts": {
21+
"codegen": "openapi-generator-cli generate -i ./myapi.yaml -g typescript-fetch -o generated-sources/openapi --additional-properties=supportsES6=true,npmVersion=6.9.0",
2122
"start": "react-scripts start",
2223
"build": "react-scripts build",
2324
"test": "react-scripts test",

0 commit comments

Comments
 (0)