Skip to content

Commit

Permalink
add openapi specs directly into the repository
Browse files Browse the repository at this point in the history
  • Loading branch information
B4nan committed Nov 25, 2024
1 parent 2c013bc commit 6c695c7
Show file tree
Hide file tree
Showing 355 changed files with 33,418 additions and 11,458 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/apiary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Install apiaryio
run: sudo gem install apiaryio
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lychee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check OpenAPI specs

on:
push:

#env:
# APIFY_STAGING_TOKEN: ${{ secrets.APIFY_STAGING_TOKEN }}

jobs:
build:
name: Build the specification file
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
# - uses: actions/setup-python@v5
# with:
# python-version: '3.10'
# - run: python -m pip install schemathesis==3.35.0
- run: |
npm ci
npm run redoc:test
8 changes: 4 additions & 4 deletions .github/workflows/publish-theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Check changes in theme
id: changed-theme-files
Expand All @@ -39,10 +39,10 @@ jobs:
with:
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ node_modules
*.pid
*.seed
.DS_Store
lib
coverage
.nyc_output
logs
pids
.idea
.vscode
yarn.lock
tmp
jsconfig.json
types
.history
.docusaurus
tsconfig.tsbuildinfo
.turbo
sources/api/*
!sources/api/sidebars.js
openapi/openapi.yaml
28 changes: 17 additions & 11 deletions .redocly.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# See https://redoc.ly/docs/cli/configuration/ for more information.
apis:
main@v1:
root: openapi/openapi/openapi.yaml

extends:
- recommended

rules:
spec: error
no-unused-components: error

theme:
htmlTemplate: openapi/docs/index.html

openapi:
requiredPropsFirst: true
noAutoAuth: true
hideDownloadButton: true
onlyRequiredInSamples: true
nativeScrollbars: true
scrollYOffset: 68
colors:
primary:
main: '#1f9ec8'
expandDefaultResponse: true
expandDefaultRequest: true
expandResponses: all
schemaExpansionLevel: 2
jsonSampleExpandLevel: 2
schemasExpansionLevel: 2
jsonSamplesExpandLevel: 2

plugins:
- openapi/plugins/apify.js

decorators:
apify/legacy-doc-url-decorator: on
apify/client-references-links-decorator: on
3 changes: 3 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ SER = "SER"

[files]
extend-exclude = ['sources/api/*.mdx']

[files]
extend-exclude = ['sources/api/*.mdx']
2 changes: 1 addition & 1 deletion apify-docs-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@apify/docs-search-modal": "^1.1.1",
"@docusaurus/theme-common": "3.6.2",
"@docusaurus/theme-common": "3.6.3",
"@stackql/docusaurus-plugin-hubspot": "^1.1.0",
"axios": "^1.7.4",
"babel-loader": "^9.1.3",
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ module.exports = {
config: {
/** @type {import('docusaurus-plugin-openapi-docs').Options} */
v2: {
specPath: 'node_modules/@apify/openapi/openapi.yaml',
specPath: 'openapi.yaml',
outputDir: './sources/api',
sidebarOptions: {
groupPathsBy: 'tag',
Expand Down
Loading

0 comments on commit 6c695c7

Please sign in to comment.