Skip to content

Commit 5449d9e

Browse files
authored
Merge pull request #14 from hey-api/fix/service-url
fix: update service url
2 parents 4ee1b93 + fc4df5c commit 5449d9e

File tree

8 files changed

+273
-108
lines changed

8 files changed

+273
-108
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div align="center">
2-
<img width="150" height="150" src="https://heyapi.vercel.app/logo.png" alt="Logo">
2+
<img alt="Hey API logo" height="150" src="https://heyapi.dev/images/logo-300w.png" width="150">
33
<h1 align="center"><b>Upload OpenAPI Specification</b></h1>
4-
<p align="center">A GitHub Action that uploads your OpenAPI specifications to Hey API 🚀</p>
4+
<p align="center">🚀 A GitHub Action that uploads your OpenAPI specifications to Hey API</p>
55
</div>
66

77
To use this action, you have to be registered with
8-
[Hey API](https://heyapi.vercel.app/). If you don't have an account, please
9-
[email us](mailto:[email protected]) or
8+
[Hey API](https://heyapi.dev/). If you don't have an account, please
9+
[email us](mailto:[email protected]) or
1010
[open an issue](https://github.com/hey-api/upload-openapi-spec/issues) and we
1111
will set you up.
1212

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ branding:
44
icon: file-plus
55
description: Upload your OpenAPI specification to Hey API
66
inputs:
7+
base-url:
8+
description: Configure Hey API server URL
9+
required: false
710
dry-run:
811
description: Run action in dry run mode
912
required: false
@@ -13,6 +16,9 @@ inputs:
1316
path-to-openapi:
1417
description: Input path to your OpenAPI specification file
1518
required: true
19+
tags:
20+
description: Custom specification tags
21+
required: false
1622
name: Upload OpenAPI spec by Hey API 👋
1723
runs:
1824
main: dist/index.js

dist/index.js

Lines changed: 97 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,42 @@
22
"name": "@hey-api/upload-openapi-spec",
33
"description": "Upload your OpenAPI specification to Hey API",
44
"version": "0.0.0",
5-
"homepage": "https://heyapi.vercel.app/",
5+
"homepage": "https://heyapi.dev",
66
"repository": {
77
"type": "git",
88
"url": "git+https://github.com/hey-api/upload-openapi-spec.git"
99
},
1010
"bugs": {
1111
"url": "https://github.com/hey-api/upload-openapi-spec/issues"
1212
},
13+
"license": "MIT",
14+
"author": {
15+
"email": "[email protected]",
16+
"name": "Hey API",
17+
"url": "https://heyapi.dev"
18+
},
19+
"funding": "https://github.com/sponsors/hey-api",
1320
"keywords": [
14-
"openapi",
15-
"swagger",
21+
"actions",
22+
"angular",
23+
"axios",
24+
"codegen",
25+
"fetch",
1626
"generator",
17-
"typescript",
27+
"github",
28+
"http",
1829
"javascript",
19-
"codegen",
20-
"yaml",
2130
"json",
22-
"fetch",
23-
"xhr",
24-
"axios",
25-
"angular",
31+
"next",
32+
"next.js",
2633
"node",
27-
"github",
28-
"actions"
34+
"nuxt",
35+
"openapi",
36+
"rest",
37+
"swagger",
38+
"typescript",
39+
"xhr",
40+
"yaml"
2941
],
3042
"exports": {
3143
".": "./dist/index.js"
@@ -45,7 +57,6 @@
4557
"package": "npx ncc build src/index.ts -o dist --source-map --license licenses.txt",
4658
"test": "npx jest"
4759
},
48-
"license": "MIT",
4960
"jest": {
5061
"preset": "ts-jest",
5162
"verbose": true,

src/main.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,28 @@ export async function run(): Promise<void> {
1111
core.getInput('dry-run', {
1212
required: false
1313
}) === 'true'
14+
const baseUrl: string = core.getInput('base-url', {
15+
required: false
16+
})
1417
const heyApiToken: string = core.getInput('hey-api-token', {
1518
required: true
1619
})
1720
const pathToOpenApi: string = core.getInput('path-to-openapi', {
1821
required: true
1922
})
23+
const tags: string = core.getInput('tags', {
24+
required: false
25+
})
2026

2127
core.debug(`Path to OpenAPI: ${pathToOpenApi}`)
2228
core.debug(`Upload started: ${new Date().toTimeString()}`)
23-
await upload(pathToOpenApi, heyApiToken, dryRun)
29+
await upload({
30+
baseUrl,
31+
dryRun,
32+
heyApiToken,
33+
pathToOpenApi,
34+
tags
35+
})
2436
core.debug(`Upload completed: ${new Date().toTimeString()}`)
2537
} catch (error) {
2638
if (error instanceof Error) {

0 commit comments

Comments
 (0)