attempt plugin with single spec file

This commit is contained in:
Deborah Barnard
2022-05-17 13:16:06 +01:00
parent 91df209001
commit bdc2462d02
40 changed files with 987 additions and 1163 deletions

View File

@@ -0,0 +1,55 @@
/**
* Extra CSS file recommended for MkDocs and neoteroi.spantable extension.
*
* https://github.com/Neoteroi/mkdocs-plugins
**/
.span-table-wrapper table {
border-collapse: collapse;
margin-bottom: 2rem;
border-radius: .1rem;
}
.span-table td, .span-table th {
padding: .2rem;
background-color: var(--md-default-bg-color);
font-size: .64rem;
max-width: 100%;
overflow: auto;
touch-action: auto;
border-top: .05rem solid var(--md-typeset-table-color);
padding: .9375em 1.25em;
vertical-align: top;
}
.span-table tr:first-child td {
font-weight: 700;
min-width: 5rem;
padding: .9375em 1.25em;
vertical-align: top;
}
.span-table td:first-child {
border-left: 0.05rem solid var(--md-typeset-table-color);
}
.span-table td:last-child {
border-right: 0.05rem solid var(--md-typeset-table-color);
}
.span-table tr:last-child {
border-bottom: 0.05rem solid var(--md-typeset-table-color);
}
.span-table [colspan], .span-table [rowspan] {
font-weight: bold;
border: 0.05rem solid var(--md-typeset-table-color);
}
.span-table tr:not(:first-child):hover td:not([colspan]):not([rowspan]),
.span-table td[colspan]:hover,
.span-table td[rowspan]:hover {
background-color: rgba(0,0,0,.035);
box-shadow: 0 0.05rem 0 var(--md-default-bg-color) inset;
transition: background-color 125ms;
}

View File

@@ -0,0 +1 @@
[OAD(./docs/api/openapi.yml)]

View File

@@ -1,113 +0,0 @@
import express = require('express');
import { BinaryDataManager } from 'n8n-core';
import { ExecutionRequest } from '../../publicApiRequest';
import { encodeNextCursor } from '../../helpers';
import { authorize, instanceOwnerSetup, validCursor } from '../../middlewares';
import {
getExecutions,
getExecutionInWorkflows,
deleteExecution,
getExecutionsCount,
} from '../../Services/execution';
import { getSharedWorkflowIds } from '../../Services/workflow';
export = {
deleteExecution: [
instanceOwnerSetup,
authorize(['owner', 'member']),
async (req: ExecutionRequest.Delete, res: express.Response): Promise<express.Response> => {
const { executionId } = req.params;
const sharedWorkflowsIds = await getSharedWorkflowIds(req.user);
// user does not have workflows hence no executions
// or the execution he is trying to access belongs to a workflow he does not own
if (!sharedWorkflowsIds.length) {
return res.status(404).json();
}
// look for the execution on the workflow the user owns
const execution = await getExecutionInWorkflows(executionId, sharedWorkflowsIds);
// execution was not found
if (!execution) {
return res.status(404).json();
}
const binaryDataManager = BinaryDataManager.getInstance();
await binaryDataManager.deleteBinaryDataByExecutionId(execution.id.toString());
await deleteExecution(execution);
return res.json(execution);
},
],
getExecution: [
instanceOwnerSetup,
authorize(['owner', 'member']),
async (req: ExecutionRequest.Get, res: express.Response): Promise<express.Response> => {
const { executionId } = req.params;
const sharedWorkflowsIds = await getSharedWorkflowIds(req.user);
// user does not have workflows hence no executions
// or the execution he is trying to access belongs to a workflow he does not own
if (!sharedWorkflowsIds.length) {
return res.status(404).json();
}
// look for the execution on the workflow the user owns
const execution = await getExecutionInWorkflows(executionId, sharedWorkflowsIds);
// execution was not found
if (!execution) {
return res.status(404).json();
}
return res.json(execution);
},
],
getExecutions: [
instanceOwnerSetup,
authorize(['owner', 'member']),
validCursor,
async (req: ExecutionRequest.GetAll, res: express.Response): Promise<express.Response> => {
const {
lastId = undefined,
limit = 100,
status = undefined,
workflowId = undefined,
} = req.query;
const sharedWorkflowsIds = await getSharedWorkflowIds(req.user);
// user does not have workflows hence no executions
// or the execution he is trying to access belongs to a workflow he does not own
if (!sharedWorkflowsIds.length) {
return res.status(404).json();
}
const filters = {
status,
limit,
lastId,
...(workflowId && { workflowIds: [workflowId] }),
};
const executions = await getExecutions(filters);
const count = await getExecutionsCount(filters);
return res.json({
data: executions,
nextCursor: encodeNextCursor({
lastId: executions.slice(-1)[0].id as number,
limit,
numberOfNextRecords: count,
}),
});
},
],
};

View File

@@ -1,146 +0,0 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unused-vars */
import express = require('express');
import { UserRequest } from '../../../requests';
import { User } from '../../../databases/entities/User';
import {
clean,
deleteDataAndSendTelemetry,
getAllUsersAndCount,
encodeNextCursor,
getUser,
getUsers,
getUsersToSaveAndInvite,
inviteUsers,
saveUsersWithRole,
transferWorkflowsAndCredentials,
} from '../../helpers';
import { ResponseHelper } from '../../..';
import { middlewares } from '../../middlewares';
export = {
createUsers: [
...middlewares.createUsers,
ResponseHelper.send(async (req: UserRequest.Invite, res: express.Response) => {
const tokenOwnerId = req.user.id;
const emailsInBody = req.body.map((data) => data.email);
const { mailer, globalMemberRole: role } = req;
const { usersToSave, pendingUsers } = await getUsersToSaveAndInvite(emailsInBody);
let savedUsers;
try {
savedUsers = await saveUsersWithRole(usersToSave, role, tokenOwnerId);
} catch (error) {
return res.status(500).json({
message: 'An error occurred during user creation',
});
}
const userstoInvite = [...savedUsers, ...pendingUsers];
await inviteUsers(userstoInvite, mailer, tokenOwnerId);
return res.json(clean(userstoInvite));
}),
],
deleteUser: [
...middlewares.deleteUsers,
async (req: UserRequest.Delete, res: express.Response) => {
const { identifier: idToDelete } = req.params;
const { transferId = '', includeRole = false } = req.query;
const apiKeyUserOwner = req.user;
const users = await getUsers({
withIdentifiers: [idToDelete, transferId],
includeRole,
});
if (apiKeyUserOwner.id === idToDelete) {
return res.status(400).json({
message: 'Cannot delete your own user',
});
}
if (!users?.length || (transferId !== '' && users.length !== 2)) {
return res.status(400).json({
message:
'Request to delete a user failed because the ID of the user to delete and/or the ID of the transferee were not found in DB',
});
}
const userToDelete = users?.find(
(user) => user.id === req.params.identifier || user.email === req.params.identifier,
) as User;
if (transferId) {
const transferee = users?.find(
(user) => user.id === transferId || user.email === transferId,
) as User;
await transferWorkflowsAndCredentials({
fromUser: userToDelete,
toUser: transferee,
});
return clean(userToDelete);
}
await deleteDataAndSendTelemetry({
fromUser: userToDelete,
apiKeyOwnerUser: apiKeyUserOwner,
transferId,
});
return clean(userToDelete, { includeRole });
},
],
getUser: [
...middlewares.getUser,
async (req: UserRequest.Get, res: express.Response) => {
const { includeRole = false } = req.query;
const { identifier } = req.params;
const user = await getUser({ withIdentifier: identifier, includeRole });
if (!user) {
return res.status(404).json({
message: `Could not find user with identifier: ${identifier}`,
});
}
return res.json(clean(user, { includeRole }));
},
],
getUsers: [
...middlewares.getUsers,
async (req: UserRequest.Get, res: express.Response) => {
const { offset = 0, limit = 100, includeRole = false } = req.query;
const [users, count] = await getAllUsersAndCount({
includeRole,
limit,
offset,
});
return res.json({
data: clean(users, { includeRole }),
nextCursor: encodeNextCursor({
offset,
limit,
numberOfTotalRecords: count,
}),
});
},
],
};

View File

@@ -1,173 +0,0 @@
import express = require('express');
import { ActiveWorkflowRunner, Db } from '../../..';
import { SharedWorkflow } from '../../../databases/entities/SharedWorkflow';
import { WorkflowEntity } from '../../../databases/entities/WorkflowEntity';
import { replaceInvalidCredentials } from '../../../WorkflowHelpers';
import { authorize, instanceOwnerSetup } from '../../middlewares';
import { WorkflowRequest } from '../../publicApiRequest';
import { getWorkflowOwnerRole } from '../../Services/role';
import {
getWorkflowById,
getSharedWorkflow,
activeWorkflow,
desactiveWorkflow,
updateWorkflow,
hasStartNode,
getStartNode,
} from '../../Services/workflow';
export = {
createWorkflow: [
instanceOwnerSetup,
authorize(['owner', 'member']),
async (req: WorkflowRequest.Create, res: express.Response): Promise<express.Response> => {
let workflow = req.body;
workflow.active = false;
// if the workflow does not have a start node, add it.
if (!hasStartNode(workflow)) {
workflow.nodes.push(getStartNode());
}
const role = await getWorkflowOwnerRole();
// is this still needed?
await replaceInvalidCredentials(workflow);
await Db.transaction(async (transactionManager) => {
const newWorkflow = new WorkflowEntity();
Object.assign(newWorkflow, workflow);
workflow = await transactionManager.save<WorkflowEntity>(newWorkflow);
const newSharedWorkflow = new SharedWorkflow();
Object.assign(newSharedWorkflow, {
role,
user: req.user,
workflow,
});
await transactionManager.save<SharedWorkflow>(newSharedWorkflow);
});
return res.json(workflow);
},
],
deleteWorkflow: [],
getWorkflow: [],
getWorkflows: [],
updateWorkflow: [
instanceOwnerSetup,
authorize(['owner', 'member']),
async (req: WorkflowRequest.Update, res: express.Response): Promise<express.Response> => {
const { workflowId } = req.params;
const updateData = new WorkflowEntity();
Object.assign(updateData, req.body);
const sharedWorkflow = await getSharedWorkflow(req.user, workflowId.toString());
if (!sharedWorkflow) {
// user trying to access a workflow he does not own
// or workflow does not exist
return res.status(404).json();
}
// if the workflow does not have a start node, add it.
// else there is nothing you can do in IU
if (!hasStartNode(updateData)) {
updateData.nodes.push(getStartNode());
}
// check credentials for old format
await replaceInvalidCredentials(updateData);
const workflowRunner = ActiveWorkflowRunner.getInstance();
if (sharedWorkflow.workflow.active) {
// When workflow gets saved always remove it as the triggers could have been
// changed and so the changes would not take effect
await workflowRunner.remove(workflowId.toString());
}
await updateWorkflow(sharedWorkflow.workflowId, updateData);
if (sharedWorkflow.workflow.active) {
try {
await workflowRunner.add(sharedWorkflow.workflowId.toString(), 'update');
} catch (error) {
// todo
// remove the type assertion
const errorObject = error as unknown as { message: string };
return res.status(400).json({ error: errorObject.message });
}
}
const updatedWorkflow = await getWorkflowById(sharedWorkflow.workflowId);
return res.json(updatedWorkflow);
},
],
activateWorkflow: [
instanceOwnerSetup,
authorize(['owner', 'member']),
async (req: WorkflowRequest.Activate, res: express.Response): Promise<express.Response> => {
const { workflowId } = req.params;
const sharedWorkflow = await getSharedWorkflow(req.user, workflowId.toString());
if (!sharedWorkflow) {
// user trying to access a workflow he does not own
// or workflow does not exist
return res.status(404).json();
}
const workflowRunner = ActiveWorkflowRunner.getInstance();
if (!sharedWorkflow.workflow.active) {
try {
await workflowRunner.add(sharedWorkflow.workflowId.toString(), 'activate');
} catch (error) {
// todo
// remove the type assertion
const errorObject = error as unknown as { message: string };
return res.status(400).json({ error: errorObject.message });
}
// change the status to active in the DB
await activeWorkflow(sharedWorkflow.workflow);
sharedWorkflow.workflow.active = true;
return res.json(sharedWorkflow.workflow);
}
// nothing to do as the wokflow is already active
return res.json(sharedWorkflow.workflow);
},
],
deactivateWorkflow: [
instanceOwnerSetup,
authorize(['owner', 'member']),
async (req: WorkflowRequest.Activate, res: express.Response): Promise<express.Response> => {
const { workflowId } = req.params;
const sharedWorkflow = await getSharedWorkflow(req.user, workflowId.toString());
if (!sharedWorkflow) {
// user trying to access a workflow he does not own
// or workflow does not exist
return res.status(404).json();
}
const workflowRunner = ActiveWorkflowRunner.getInstance();
if (sharedWorkflow.workflow.active) {
await workflowRunner.remove(sharedWorkflow.workflowId.toString());
await desactiveWorkflow(sharedWorkflow.workflow);
return res.json(sharedWorkflow.workflow);
}
// nothing to do as the wokflow is already inactive
return res.json(sharedWorkflow);
},
],
};

View File

@@ -1,56 +0,0 @@
---
openapi: 3.0.0
info:
title: n8n Public API
description: n8n Public API
termsOfService: https://n8n.io/legal/terms
contact:
email: hello@n8n.io
license:
name: Sustainable Use License
url: https://github.com/n8n-io/n8n/blob/master/packages/cli/LICENSE.md
version: v1
externalDocs:
description: n8n API documentation
url: https://docs.n8n.io/api/
servers:
- url: /api/v1
tags:
- name: User
description: Operations about user
- name: Execution
description: Operations about execution
- name: Workflow
description: Operations about workflow
paths:
/users:
$ref: './spec/paths/Users.yml'
/users/{identifier}:
$ref: './spec/paths/UserById.yml'
/executions:
$ref: './spec/paths/Executions.yml'
/executions/{executionId}:
$ref: './spec/paths/ExecutionById.yml'
/workflows:
$ref: './spec/paths/Workflows.yml'
/workflows/{workflowId}:
$ref: './spec/paths/WorkflowById.yml'
/workflows/{workflowId}/activate:
$ref: './spec/paths/WorkflowByIdActivate.yml'
/workflows/{workflowId}/deactivate:
$ref: './spec/paths/WorkflowByIdDeactivate.yml'
components:
schemas:
$ref: './spec/schemas/_index.yml'
responses:
$ref: './spec/responses/_index.yml'
parameters:
$ref: './spec/parameters/_index.yml'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-N8N-API-KEY
security:
- ApiKeyAuth: []

View File

@@ -1,8 +0,0 @@
name: cursor
in: query
description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
required: false
style: form
schema:
type: string
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA

View File

@@ -1,6 +0,0 @@
name: executionId
in: path
description: The ID of the execution.
required: true
schema:
type: number

View File

@@ -1,6 +0,0 @@
name: includeRole
in: query
required: false
schema:
type: boolean
example: true

View File

@@ -1,8 +0,0 @@
name: limit
in: query
description: The maximum number of items to return.
required: false
schema:
type: number
example: 100
default: 100

View File

@@ -1,7 +0,0 @@
name: identifier
in: path
description: The ID or email of the user.
required: true
schema:
type: string
format: identifier

View File

@@ -1,6 +0,0 @@
name: workflowId
in: path
description: The ID of the workflow.
required: true
schema:
type: number

View File

@@ -1,12 +0,0 @@
UserIdentifier:
$ref: './UserIdentifier.yml'
Cursor:
$ref: './Cursor.yml'
includeRole:
$ref: './IncludeRole.yml'
Limit:
$ref: './Limit.yml'
ExecutionId:
$ref: './ExecutionId.yml'
WorkflowId:
$ref: './WorkflowId.yml'

View File

@@ -1,40 +0,0 @@
get:
x-eov-operation-id: getExecution
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Retrieve an execution
description: Retrieve an execution from you instance.
parameters:
- $ref: '../parameters/ExecutionId.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/ExecutionInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'
delete:
x-eov-operation-id: deleteExecution
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Delete an execution
description: Deletes an execution from your instance.
parameters:
- $ref: '../parameters/ExecutionId.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/ExecutionInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'

View File

@@ -1,35 +0,0 @@
get:
x-eov-operation-id: getExecutions
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Retrieve all executions
description: Retrieve all executions from your instance.
parameters:
- name: status
in: query
description: Status to filter the executions by.
required: false
schema:
type: string
enum: ['error', 'running', 'success', 'waiting']
- name: workflowId
in: query
description: Workflow to filter the executions by.
required: false
schema:
type: number
example: 1000
- $ref: '../parameters/Limit.yml'
- $ref: '../parameters/Cursor.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/ExecutionDetailsResponse.yml'
"401":
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'

View File

@@ -1,38 +0,0 @@
get:
x-eov-operation-id: getUser
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Get user by ID/Email
description: Retrieve a user from your instance. Only available for the instance owner.
parameters:
- $ref: '../parameters/UserIdentifier.yml'
- $ref: '../parameters/IncludeRole.yml'
responses:
'200':
$ref: '../responses/UserInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
delete:
x-eov-operation-id: deleteUser
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Delete user by ID/Email
description: Deletes a user from your instance. Only available for the instance owner.
operationId: deleteUser
parameters:
- $ref: '../parameters/UserIdentifier.yml'
- $ref: '../parameters/IncludeRole.yml'
- name: transferId
in: query
description: ID of the user to transfer workflows and credentials to. Must not be equal to the to-be-deleted user.
required: false
schema:
type: string
responses:
'200':
$ref: '../responses/UserInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View File

@@ -1,48 +0,0 @@
post:
x-eov-operation-id: createUsers
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Invite a user
description: Invites a user to your instance. Only available for the instance owner.
operationId: createUser
requestBody:
description: Created user object.
content:
application/json:
schema:
type: array
items:
$ref: '../schemas/UserInformation.yml'
required: true
responses:
'200':
description: A User object
content:
application/json:
schema:
type: array
items:
$ref: '../schemas/UserInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
get:
x-eov-operation-id: getUsers
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Retrieve all users
description: Retrieve all users from your instance. Only available for the instance owner.
parameters:
- $ref: '../parameters/Limit.yml'
- $ref: '../parameters/Cursor.yml'
- $ref: '../parameters/IncludeRole.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/UserDetailsResponse.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View File

@@ -1,65 +0,0 @@
get:
x-eov-operation-id: getWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Retrive all workflows
description: Retrieve all workflows from your instance.
parameters:
- $ref: '../parameters/WorkflowId.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'
delete:
x-eov-operation-id: deleteWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Delete a workflow
description: Deletes a workflow from your instance.
parameters:
- $ref: '../parameters/WorkflowId.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'
put:
x-eov-operation-id: updateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Update a workflow
description: Update a workflow.
parameters:
- $ref: '../parameters/WorkflowId.yml'
requestBody:
description: Updated workflow object.
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
required: true
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View File

@@ -1,18 +0,0 @@
post:
x-eov-operation-id: activateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Activate a workflow
description: Active a workflow.
parameters:
- $ref: '../parameters/WorkflowId.yml'
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View File

@@ -1,18 +0,0 @@
post:
x-eov-operation-id: deactivateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Deactivate a workflow
description: Deactivate a workflow.
parameters:
- $ref: '../parameters/WorkflowId.yml'
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View File

@@ -1,54 +0,0 @@
post:
x-eov-operation-id: createWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Create a workflow
description: Create a workflow in your instance.
requestBody:
description: Created user object.
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
required: true
responses:
'200':
description: A User object
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
get:
x-eov-operation-id: getWorkflows
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Retrieve all workflows
description: Retrieve all workflows from your instance.
parameters:
- name: active
in: query
schema:
type: boolean
example: true
- name: tags
in: query
required: false
explode: false
schema:
type: string
example: test,production
- $ref: '../parameters/Limit.yml'
- $ref: '../parameters/Cursor.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/WorkflowDetailsResponse.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View File

@@ -1,5 +0,0 @@
description: The specified resource was not found.
content:
application/json:
schema:
$ref: '../schemas/Error.yml'

View File

@@ -1,5 +0,0 @@
description: Unauthorized
content:
application/json:
schema:
$ref: '../schemas/Error.yml'

View File

@@ -1,5 +0,0 @@
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/UserInformation.yml'

View File

@@ -1,6 +0,0 @@
NotFound:
$ref: './NotFound.yml'
Unauthorized:
$ref: './Unauthorized.yml'
UserInformation:
$ref: './UserInformation.yml'

View File

@@ -1,13 +0,0 @@
#error.yml
required:
- code
- description
- message
type: object
properties:
code:
type: string
message:
type: string
description:
type: string

View File

@@ -1,11 +0,0 @@
type: object
properties:
data:
type: array
items:
$ref: './ExecutionInformation.yml'
nextCursor:
type: string
description: Paginate through executions by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA

View File

@@ -1,33 +0,0 @@
type: object
properties:
id:
type: number
example: 1000
data:
type: string
finished:
type: boolean
example: true
mode:
type: string
enum: ['cli', 'error', 'integrated', 'internal', 'manual', 'retry', 'trigger', 'webhook']
retryOf:
type: string
nullable: true
retrySuccessId:
type: string
nullable: true
example: 2
startedAt:
type: string
format: date-time
stoppedAt:
type: string
format: date-time
workflowId:
type: string
example: 1000
waitTill:
type: string
nullable: true
format: date-time

View File

@@ -1,31 +0,0 @@
type: object
additionalProperties: false
properties:
name:
type: string
example: Jira
type:
type: string
example: n8n-nodes-base.Jira
typeVersion:
type: number
example: 1
position:
type: array
items:
type: number
example: [-100, 80]
parameters:
type: object
example: { additionalProperties: {} }
credentials:
type: object
example: { jiraSoftwareCloudApi: { id: "35", name: "jiraApi"} }
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true

View File

@@ -1,25 +0,0 @@
readOnly: true
type: object
properties:
id:
type: number
readOnly: true
example: 1
name:
type: string
example: owner
readOnly: true
scope:
type: string
readOnly: true
example: global
createdAt:
type: string
description: Time the role was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the role was updaded.
format: date-time
readOnly: true

View File

@@ -1,16 +0,0 @@
type: object
properties:
id:
type: string
example: 12
name:
type: string
example: Production
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true

View File

@@ -1,11 +0,0 @@
type: object
properties:
data:
type: array
items:
$ref: './UserInformation.yml'
nextCursor:
type: string
description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA

View File

@@ -1,40 +0,0 @@
required:
- email
type: object
properties:
id:
type: string
readOnly: true
example: 123e4567-e89b-12d3-a456-426614174000
email:
type: string
format: email
example: john.doe@company.com
firstName:
maxLength: 32
type: string
description: User's first name
readOnly: true
example: john
lastName:
maxLength: 32
type: string
description: User's last name
readOnly: true
example: Doe
isPending:
type: boolean
description: Whether the user finished setting up their account in response to the invitation (true) or not (false).
readOnly: true
createdAt:
type: string
description: Time the user was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the user was updated.
format: date-time
readOnly: true
globalRole:
$ref: './RoleInformation.yml'

View File

@@ -1,11 +0,0 @@
type: object
properties:
data:
type: array
items:
$ref: './WorkflowInformation.yml'
nextCursor:
type: string
description: Paginate through workflows by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA

View File

@@ -1,44 +0,0 @@
type: object
required:
- name
- nodes
- connections
- settings
properties:
id:
type: number
readOnly: true
example: 1
name:
type: string
example: Workflow 1
active:
type: boolean
readOnly: true
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
nodes:
type: array
items:
$ref: './NodeInformation.yml'
connections:
type: object
example: { main: [{node: "Jira", type: "main", index: 0}] }
settings:
$ref: './WorkflowSettingInformation.yml'
staticData:
type: string
nullable: true
readOnly: true
example: "{ iterationId: 2 }"
tags:
type: array
items:
$ref: './TagInformation.yml'
readOnly: true

View File

@@ -1,24 +0,0 @@
type: object
additionalProperties: false
properties:
saveExecutionProgress:
type: boolean
saveManualExecutions:
type: boolean
saveDataErrorExecution:
type: string
enum: ['all', 'none']
saveDataSuccessExecution:
type: string
enum: ['all', 'none']
executionTimeout:
type: number
example: 3600
maxLength: 3600
errorWorkflow:
type: string
example: 10
description: The ID of the workflow that contains the error trigger node.
timezone:
type: string
example: America/New_York

View File

@@ -1,23 +0,0 @@
Error:
$ref: './Error.yml'
ExecutionInformation:
$ref: './ExecutionInformation.yml'
NodeInformation:
$ref: './NodeInformation.yml'
RoleInformation:
$ref: './RoleInformation.yml'
TagInformation:
$ref: './TagInformation.yml'
UserInformation:
$ref: './UserInformation.yml'
WorkflowInformation:
$ref: './WorkflowInformation.yml'
WorkflowSettingInformation:
$ref: './WorkflowSettingInformation.yml'
UserDetailsResponse:
$ref: './UserDetailsResponse.yml'
ExecutionDetailsResponse:
$ref: './ExecutionDetailsResponse.yml'
WorkflowDetailsResponse:
$ref: './WorkflowDetailsResponse.yml'

924
docs/api/openapi.yml Normal file
View File

@@ -0,0 +1,924 @@
openapi: 3.0.0
info:
title: n8n Public API
description: n8n Public API
termsOfService: 'https://n8n.io/legal/terms'
contact:
email: hello@n8n.io
license:
name: Sustainable Use License
url: 'https://github.com/n8n-io/n8n/blob/master/packages/cli/LICENSE.md'
version: v1
externalDocs:
description: n8n API documentation
url: 'https://docs.n8n.io/api/'
servers:
- url: /api/v1
tags:
- name: User
description: Operations about users
- name: Execution
description: Operations about executions
- name: Workflow
description: Operations about workflows
- name: Credential
description: Operations about credentials
- name: CredentialType
description: Operations about credential types
paths:
/credentials:
post:
x-eov-operation-id: createCredential
x-eov-operation-handler: v1/handlers/credentials/credentials.handler
tags:
- Credential
summary: Create a credential
description: Creates a credential that can be used by nodes of the specified type.
requestBody:
description: Credential to be created.
required: true
content:
application/json:
schema:
required:
- name
- type
- data
type: object
properties:
id:
type: number
readOnly: true
example: 42
name:
type: string
example: Joe's Github Credentials
type:
type: string
example: github
data:
type: object
writeOnly: true
example:
token: ada612vad6fa5df4adf5a5dsf4389adsf76da7s
createdAt:
type: string
format: date-time
readOnly: true
example: '2022-04-29T11:02:29.842Z'
updatedAt:
type: string
format: date-time
readOnly: true
example: '2022-04-29T11:02:29.842Z'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/paths/~1credentials/post/requestBody/content/application~1json/schema'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'415':
description: Unsupported media type.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'/credentials/{id}':
delete:
x-eov-operation-id: deleteCredential
x-eov-operation-handler: v1/handlers/credentials/credentials.handler
tags:
- Credential
summary: Delete credential by ID
description: Deletes a credential from your instance. You must be the owner of the credentials
operationId: deleteCredential
parameters:
- name: id
in: path
description: The credential ID that needs to be deleted
required: true
schema:
type: number
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/paths/~1credentials/post/requestBody/content/application~1json/schema'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden. You are not allowed to delete this credential.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Credential not found
'/credentialTypes/{credentialTypeId}/schema':
get:
x-eov-operation-id: getCredentialType
x-eov-operation-handler: v1/handlers/credentialTypes/credentialTypes.handler
tags:
- CredentialType
summary: Retrieve credential type by ID
parameters:
- name: credentialTypeId
in: path
description: The credential type ID that you need to retrive
required: true
schema:
type: string
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Credential type not found
/users:
post:
x-eov-operation-id: createUser
x-eov-operation-handler: v1/handlers/users/users.handler
tags:
- User
summary: Invite a user
description: Invites a user to your instance. Only available for the instance owner.
requestBody:
description: Created user object.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UserInformation'
required: true
responses:
'200':
description: A User object
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UserInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
get:
x-eov-operation-id: getUsers
x-eov-operation-handler: v1/handlers/users/users.handler
tags:
- User
summary: Retrieve all users
description: Retrieve all users from your instance. Only available for the instance owner.
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/includeRole'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/UserDetailsResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/responses/NotFound/content/application~1json/schema'
'/users/{identifier}':
get:
x-eov-operation-id: getUser
x-eov-operation-handler: v1/handlers/users/users.handler
tags:
- User
summary: Get user by ID/Email
description: Retrieve a user from your instance. Only available for the instance owner.
parameters:
- $ref: '#/components/parameters/UserIdentifier'
- $ref: '#/components/parameters/includeRole'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/UserInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
delete:
x-eov-operation-id: deleteUser
x-eov-operation-handler: v1/handlers/users/users.handler
tags:
- User
summary: Delete user by ID/Email
description: Deletes a user from your instance. Only available for the instance owner.
operationId: deleteUser
parameters:
- $ref: '#/components/parameters/UserIdentifier'
- $ref: '#/components/parameters/includeRole'
- name: transferId
in: query
description: ID of the user to transfer workflows and credentials to. Must not be equal to the to-be-deleted user.
schema:
type: string
format: identifier
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/UserInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
/executions:
get:
x-eov-operation-id: getExecutions
x-eov-operation-handler: v1/handlers/executions/executions.handler
tags:
- Execution
summary: Retrieve all executions
description: Retrieve all executions from your instance.
parameters:
- name: status
in: query
description: Status to filter the executions by.
required: false
schema:
type: string
enum:
- error
- success
- waiting
- name: workflowId
in: query
description: Workflow to filter the executions by.
required: false
schema:
type: number
example: 1000
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionDetailsResponse'
'401':
$ref: '#/paths/~1users/get/responses/401'
'404':
description: The specified resource was not found.
content:
application/json:
schema:
$ref: '#/components/responses/NotFound/content/application~1json/schema'
'/executions/{executionId}':
get:
x-eov-operation-id: getExecution
x-eov-operation-handler: v1/handlers/executions/executions.handler
tags:
- Execution
summary: Retrieve an execution
description: Retrieve an execution from you instance.
parameters:
- $ref: '#/components/parameters/ExecutionId'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
'404':
$ref: '#/paths/~1executions/get/responses/404'
delete:
x-eov-operation-id: deleteExecution
x-eov-operation-handler: v1/handlers/executions/executions.handler
tags:
- Execution
summary: Delete an execution
description: Deletes an execution from your instance.
parameters:
- $ref: '#/components/parameters/ExecutionId'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
'404':
$ref: '#/paths/~1executions/get/responses/404'
/workflows:
post:
x-eov-operation-id: createWorkflow
x-eov-operation-handler: v1/handlers/workflows/workflows.handler
tags:
- Workflow
summary: Create a workflow
description: Create a workflow in your instance.
requestBody:
description: Created user object.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
required: true
responses:
'200':
description: A User object
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
get:
x-eov-operation-id: getWorkflows
x-eov-operation-handler: v1/handlers/workflows/workflows.handler
tags:
- Workflow
summary: Retrieve all workflows
description: Retrieve all workflows from your instance.
parameters:
- name: active
in: query
schema:
type: boolean
example: true
- name: tags
in: query
required: false
explode: false
schema:
type: string
example: 'test,production'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowDetailsResponse'
'401':
$ref: '#/paths/~1users/get/responses/401'
'/workflows/{workflowId}':
get:
x-eov-operation-id: getWorkflow
x-eov-operation-handler: v1/handlers/workflows/workflows.handler
tags:
- Workflow
summary: Retrive all workflows
description: Retrieve all workflows from your instance.
parameters:
- $ref: '#/components/parameters/WorkflowId'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
'404':
$ref: '#/paths/~1executions/get/responses/404'
delete:
x-eov-operation-id: deleteWorkflow
x-eov-operation-handler: v1/handlers/workflows/workflows.handler
tags:
- Workflow
summary: Delete a workflow
description: Deletes a workflow from your instance.
parameters:
- $ref: '#/components/parameters/WorkflowId'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
'404':
$ref: '#/paths/~1executions/get/responses/404'
put:
x-eov-operation-id: updateWorkflow
x-eov-operation-handler: v1/handlers/workflows/workflows.handler
tags:
- Workflow
summary: Update a workflow
description: Update a workflow.
parameters:
- $ref: '#/components/parameters/WorkflowId'
requestBody:
description: Updated workflow object.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
required: true
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
'/workflows/{workflowId}/activate':
post:
x-eov-operation-id: activateWorkflow
x-eov-operation-handler: v1/handlers/workflows/workflows.handler
tags:
- Workflow
summary: Activate a workflow
description: Active a workflow.
parameters:
- $ref: '#/components/parameters/WorkflowId'
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
'/workflows/{workflowId}/deactivate':
post:
x-eov-operation-id: deactivateWorkflow
x-eov-operation-handler: v1/handlers/workflows/workflows.handler
tags:
- Workflow
summary: Deactivate a workflow
description: Deactivate a workflow.
parameters:
- $ref: '#/components/parameters/WorkflowId'
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
'401':
$ref: '#/paths/~1users/get/responses/401'
components:
schemas:
Error:
required:
- code
- description
- message
type: object
properties:
code:
type: string
message:
type: string
description:
type: string
ExecutionInformation:
type: object
properties:
id:
type: number
example: 1000
data:
type: string
finished:
type: boolean
example: true
mode:
type: string
enum:
- cli
- error
- integrated
- internal
- manual
- retry
- trigger
- webhook
retryOf:
type: string
nullable: true
retrySuccessId:
type: string
nullable: true
example: 2
startedAt:
type: string
format: date-time
stoppedAt:
type: string
format: date-time
workflowId:
type: string
example: 1000
waitTill:
type: string
nullable: true
format: date-time
NodeInformation:
type: object
additionalProperties: false
properties:
name:
type: string
example: Jira
type:
type: string
example: n8n-nodes-base.Jira
typeVersion:
type: number
example: 1
position:
type: array
items:
type: number
example:
- -100
- 80
parameters:
type: object
example:
additionalProperties: {}
credentials:
type: object
example:
jiraSoftwareCloudApi:
id: '35'
name: jiraApi
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
RoleInformation:
readOnly: true
type: object
properties:
id:
type: number
readOnly: true
example: 1
name:
type: string
example: owner
readOnly: true
scope:
type: string
readOnly: true
example: global
createdAt:
type: string
description: Time the role was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the role was updaded.
format: date-time
readOnly: true
TagInformation:
type: object
properties:
id:
type: string
example: 12
name:
type: string
example: Production
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
UserInformation:
required:
- email
type: object
properties:
id:
type: string
readOnly: true
example: 123e4567-e89b-12d3-a456-426614174000
email:
type: string
format: email
example: john.doe@company.com
firstName:
maxLength: 32
type: string
description: User's first name
readOnly: true
example: john
lastName:
maxLength: 32
type: string
description: User's last name
readOnly: true
example: Doe
isPending:
type: boolean
description: Whether the user finished setting up their account in response to the invitation (true) or not (false).
readOnly: true
createdAt:
type: string
description: Time the user was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the user was updated.
format: date-time
readOnly: true
globalRole:
$ref: '#/components/schemas/RoleInformation'
WorkflowInformation:
type: object
required:
- name
- nodes
- connections
- settings
properties:
id:
type: number
readOnly: true
example: 1
name:
type: string
example: Workflow 1
active:
type: boolean
readOnly: true
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
nodes:
type: array
items:
$ref: '#/components/schemas/NodeInformation'
connections:
type: object
example:
main:
- node: Jira
type: main
index: 0
settings:
$ref: '#/components/schemas/WorkflowSettingInformation'
staticData:
type: string
nullable: true
example: '{ iterationId: 2 }'
tags:
type: array
items:
type: object
properties:
id:
type: string
example: 12
name:
type: string
example: Production
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
readOnly: true
WorkflowSettingInformation:
type: object
additionalProperties: false
properties:
saveExecutionProgress:
type: boolean
saveManualExecutions:
type: boolean
saveDataErrorExecution:
type: string
enum:
- all
- none
saveDataSuccessExecution:
type: string
enum:
- all
- none
executionTimeout:
type: number
example: 3600
maxLength: 3600
errorWorkflow:
type: string
example: 10
description: The ID of the workflow that contains the error trigger node.
timezone:
type: string
example: America/New_York
UserDetailsResponse:
type: object
properties:
data:
type: array
items:
required:
- email
type: object
properties:
id:
type: string
readOnly: true
example: 123e4567-e89b-12d3-a456-426614174000
email:
type: string
format: email
example: john.doe@company.com
firstName:
maxLength: 32
type: string
description: User's first name
readOnly: true
example: john
lastName:
maxLength: 32
type: string
description: User's last name
readOnly: true
example: Doe
isPending:
type: boolean
description: Whether the user finished setting up their account in response to the invitation (true) or not (false).
readOnly: true
createdAt:
type: string
description: Time the user was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the user was updated.
format: date-time
readOnly: true
globalRole:
$ref: '#/components/schemas/RoleInformation'
nextCursor:
type: string
description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
ExecutionDetailsResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ExecutionInformation'
nextCursor:
type: string
description: Paginate through executions by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
WorkflowDetailsResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkflowInformation'
nextCursor:
type: string
description: Paginate through workflows by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
responses:
NotFound:
description: The specified resource was not found.
content:
application/json:
schema:
required:
- code
- description
- message
type: object
properties:
code:
type: string
message:
type: string
description:
type: string
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/responses/NotFound/content/application~1json/schema'
parameters:
UserIdentifier:
name: identifier
in: path
description: The ID or email of the user.
required: true
schema:
type: string
format: identifier
Cursor:
name: cursor
in: query
description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
required: false
style: form
schema:
type: string
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
includeRole:
name: includeRole
in: query
required: false
schema:
type: boolean
example: true
Limit:
name: limit
in: query
description: The maximum number of items to return.
required: false
schema:
type: number
example: 100
default: 100
ExecutionId:
name: executionId
in: path
description: The ID of the execution.
required: true
schema:
type: number
WorkflowId:
name: workflowId
in: path
description: The ID of the workflow.
required: true
schema:
type: number
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-N8N-API-KEY
security:
- ApiKeyAuth: []

View File

@@ -18,6 +18,8 @@ theme:
# https://squidfunk.github.io/mkdocs-material/customization/?h=#additional-css
extra_css:
- _extra/css/extra.css
- _extra/css/mkdocsoad.css
- _extra/css/spantable.css
# https://squidfunk.github.io/mkdocs-material/customization/?h=#additional-javascript
extra_javascript:
- _extra/javascript/extra.js
@@ -35,7 +37,7 @@ markdown_extensions:
# https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#superfences Used for tags, setting unique templates for certain pages, and other custom frontmatter.
- meta
# https://github.com/Neoteroi/mkdocs-plugins
# - neoteroi.spantable
- neoteroi.spantable
- pymdownx.details
# https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/
- pymdownx.emoji:
@@ -64,7 +66,8 @@ plugins:
# https://github.com/oprypin/mkdocs-literate-nav
- literate-nav
# https://github.com/Neoteroi/mkdocs-plugins
# - neoteroi.mkdocsoad
- neoteroi.mkdocsoad:
use_pymdownx: true
# https://github.com/bharel/mkdocs-render-swagger-plugin
- render_swagger
nav:
@@ -204,5 +207,6 @@ nav:
- Authentication: api/authentication.md
- Endpoint reference using plugin: api/api-reference-1.md
- Endpoint reference using Swagger UI directly: api/api-reference-2.md
- Sleeker plugin: api/api-reference-3.md
- Redoc: api/api-reference-4.md
- Contributing: contributing.md

View File

@@ -1,2 +1,2 @@
mkdocs-literate-nav==0.4.1
mkdocs-render-swagger-plugin==0.0.3
neoteroi-mkdocs==0.0.5