Skip to content

Commit

Permalink
Structure adjustments (#6)
Browse files Browse the repository at this point in the history
# Motivations
Organization

# Modifications
- Move everything to `/spec`
- Rename `openapi.yml` to `reference.yml`
- Produce a `.yml` bundle on top of a `.yaml`, just to make it easier
for anyone using the remote spec locations
- Adjust `package.json` scripts to be more organized, readable, and
easily modular
- Upgrade Redocly to latest
  • Loading branch information
Twinki14 authored Oct 13, 2024
1 parent 8d868fc commit c23293a
Show file tree
Hide file tree
Showing 70 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
configFilePath: GitVersion.yml

- name: Replace - Version
run: sed -i 's/0.0.0/${{ steps.gitversion.outputs.majorMinorPatch }}${{ steps.gitversion.outputs.preReleaseLabel }}${{ steps.gitversion.outputs.preReleaseNumber }}/g' openapi/openapi.yml
run: sed -i 's/0.0.0/${{ steps.gitversion.outputs.majorMinorPatch }}${{ steps.gitversion.outputs.preReleaseLabel }}${{ steps.gitversion.outputs.preReleaseNumber }}/g' spec/reference.yml

- name: Bun - Install
run: bun install --frozen-lockfile
Expand Down
Binary file modified bun.lockb
Binary file not shown.
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"name": "satisfactory-api-v1",
"name": "satisfactory-api-spec",
"version": "1.0.0",
"private": true,
"scripts": {
"bundle-yaml": "openapi bundle -o dist/$npm_package_name.yaml",
"bundle-yml": "openapi bundle -o dist/$npm_package_name.yml",
"bundle-json": "openapi bundle -o dist/$npm_package_name.json",
"bundle": "bun run bundle-yaml && bun run bundle-yml && bun run bundle-json",
"build-redoc": "openapi build-docs dist/$npm_package_name.yaml -o dist/index.html",
"build": "bun run bundle && bun run build-redoc",
"start": "openapi preview-docs",
"build": "openapi bundle -o dist/satisfactory-api-spec.yaml && openapi bundle -o dist/satisfactory-api-spec.json && openapi build-docs dist/satisfactory-api-spec.yaml -o dist/index.html",
"lint": "openapi lint"
},
"dependencies": {
"@redocly/cli": "^1.25.3"
"@redocly/cli": "^1.25.5"
}
}
2 changes: 1 addition & 1 deletion redocly.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://docs.redoc.ly/cli/configuration/ for more information.
apis:
main@v1:
root: openapi/openapi.yml
root: spec/reference.yml
extends:
- recommended
rules:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c23293a

Please sign in to comment.