mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-01 10:49:07 +00:00
FIX: Docs
This commit is contained in:
@@ -185,7 +185,19 @@ jobs:
|
||||
DOCS_BLOCK_ID: ${{ steps.extract_docs_block_id.outputs.result }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
curl $DOCS_URL -X POST -d '{"service": "\$DOCS_API_TOKEN","pageId": "\$DOCS_PAGE_ID","blockId": "\$DOCS_BLOCK_ID","schema": "../swagger.json"}' -H 'Content-Type: application/json'
|
||||
SWAGGER=`cat swagger.txt`
|
||||
curl --request POST \
|
||||
--url $DOCS_URL \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data @<(cat <<EOF
|
||||
{
|
||||
"service": "$DOCS_API_TOKEN",
|
||||
"pageId": "$DOCS_PAGE_ID",
|
||||
"blockId": "$DOCS_BLOCK_ID",
|
||||
"schema": $SWAGGER
|
||||
}
|
||||
EOF
|
||||
)
|
||||
- name: Cleanup Docker's Leftovers
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
|
||||
+1
-6
@@ -30,16 +30,11 @@ async function bootstrap() {
|
||||
.setDescription('Documentation for Maestro gateway')
|
||||
.setVersion('1.0')
|
||||
.addBearerAuth()
|
||||
.addServer(
|
||||
process.env.ENV === 'local'
|
||||
? 'http://localhost:3333'
|
||||
: 'https://maestro.dev.dadosfera.ai',
|
||||
)
|
||||
.build();
|
||||
|
||||
const document = SwaggerModule.createDocument(app, config);
|
||||
|
||||
await writeFileSync('swagger.json', JSON.stringify(document));
|
||||
await writeFileSync('swagger.txt', JSON.stringify(JSON.stringify(document)));
|
||||
|
||||
await app.listen(3333);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user