Skip to content

fix: update service url #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div align="center">
<img width="150" height="150" src="https://heyapi.vercel.app/logo.png" alt="Logo">
<img alt="Hey API logo" height="150" src="https://heyapi.dev/images/logo-300w.png" width="150">
<h1 align="center"><b>Upload OpenAPI Specification</b></h1>
<p align="center">A GitHub Action that uploads your OpenAPI specifications to Hey API 🚀</p>
<p align="center">🚀 A GitHub Action that uploads your OpenAPI specifications to Hey API</p>
</div>

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

Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ branding:
icon: file-plus
description: Upload your OpenAPI specification to Hey API
inputs:
base-url:
description: Configure Hey API server URL
required: false
dry-run:
description: Run action in dry run mode
required: false
Expand All @@ -13,6 +16,9 @@ inputs:
path-to-openapi:
description: Input path to your OpenAPI specification file
required: true
tags:
description: Custom specification tags
required: false
name: Upload OpenAPI spec by Hey API 👋
runs:
main: dist/index.js
Expand Down
138 changes: 97 additions & 41 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 24 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,42 @@
"name": "@hey-api/upload-openapi-spec",
"description": "Upload your OpenAPI specification to Hey API",
"version": "0.0.0",
"homepage": "https://heyapi.vercel.app/",
"homepage": "https://heyapi.dev",
"repository": {
"type": "git",
"url": "git+https://github.com/hey-api/upload-openapi-spec.git"
},
"bugs": {
"url": "https://github.com/hey-api/upload-openapi-spec/issues"
},
"license": "MIT",
"author": {
"email": "[email protected]",
"name": "Hey API",
"url": "https://heyapi.dev"
},
"funding": "https://github.com/sponsors/hey-api",
"keywords": [
"openapi",
"swagger",
"actions",
"angular",
"axios",
"codegen",
"fetch",
"generator",
"typescript",
"github",
"http",
"javascript",
"codegen",
"yaml",
"json",
"fetch",
"xhr",
"axios",
"angular",
"next",
"next.js",
"node",
"github",
"actions"
"nuxt",
"openapi",
"rest",
"swagger",
"typescript",
"xhr",
"yaml"
],
"exports": {
".": "./dist/index.js"
Expand All @@ -45,7 +57,6 @@
"package": "npx ncc build src/index.ts -o dist --source-map --license licenses.txt",
"test": "npx jest"
},
"license": "MIT",
"jest": {
"preset": "ts-jest",
"verbose": true,
Expand Down
14 changes: 13 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,28 @@ export async function run(): Promise<void> {
core.getInput('dry-run', {
required: false
}) === 'true'
const baseUrl: string = core.getInput('base-url', {
required: false
})
const heyApiToken: string = core.getInput('hey-api-token', {
required: true
})
const pathToOpenApi: string = core.getInput('path-to-openapi', {
required: true
})
const tags: string = core.getInput('tags', {
required: false
})

core.debug(`Path to OpenAPI: ${pathToOpenApi}`)
core.debug(`Upload started: ${new Date().toTimeString()}`)
await upload(pathToOpenApi, heyApiToken, dryRun)
await upload({
baseUrl,
dryRun,
heyApiToken,
pathToOpenApi,
tags
})
core.debug(`Upload completed: ${new Date().toTimeString()}`)
} catch (error) {
if (error instanceof Error) {
Expand Down
Loading