From b0a1be902db09e65a45a78170aa8d92222541676 Mon Sep 17 00:00:00 2001 From: Thulio Prado Date: Thu, 17 Sep 2020 17:22:40 -0300 Subject: [PATCH 01/41] fixes and changes --- packages/spec/specs/components/activity.yaml | 27 ++- packages/spec/specs/components/user.yaml | 49 +++-- packages/spec/specs/openapi.yaml | 197 +++++++++--------- .../spec/specs/paths/activity/activities.yaml | 30 +++ .../paths/activity/activity-comment.yaml | 33 +-- .../paths/activity/activity-comments.yaml | 18 +- .../spec/specs/paths/activity/activity.yaml | 23 +- .../spec/specs/paths/activity/activitys.yaml | 30 --- packages/spec/specs/paths/assets/assets.yaml | 8 +- packages/spec/specs/paths/auth/login.yaml | 14 +- .../specs/paths/auth/password-request.yaml | 6 +- .../spec/specs/paths/auth/password-reset.yaml | 6 +- packages/spec/specs/paths/auth/refresh.yaml | 16 +- .../spec/specs/paths/auth/sso-provider.yaml | 8 +- packages/spec/specs/paths/auth/sso.yaml | 6 +- .../specs/paths/collections/collection.yaml | 46 ++-- .../specs/paths/collections/collections.yaml | 38 ++-- .../specs/paths/extensions/interfaces.yaml | 12 +- .../spec/specs/paths/extensions/layouts.yaml | 12 +- .../spec/specs/paths/extensions/modules.yaml | 12 +- .../specs/paths/fields/collection-field.yaml | 44 ++-- .../specs/paths/fields/collection-fields.yaml | 36 ++-- packages/spec/specs/paths/fields/fields.yaml | 18 +- packages/spec/specs/paths/files/file.yaml | 24 +-- packages/spec/specs/paths/files/files.yaml | 16 +- packages/spec/specs/paths/files/revision.yaml | 10 +- .../spec/specs/paths/files/revisions.yaml | 10 +- packages/spec/specs/paths/folders/folder.yaml | 50 ++--- .../spec/specs/paths/folders/folders.yaml | 48 ++--- packages/spec/specs/paths/items/item.yaml | 42 ++-- packages/spec/specs/paths/items/items.yaml | 34 +-- packages/spec/specs/paths/mail/mail.yaml | 12 +- .../specs/paths/permissions/permission.yaml | 48 ++--- .../permissions-me-collection.yaml | 16 +- .../paths/permissions/permissions-me.yaml | 14 +- .../specs/paths/permissions/permissions.yaml | 50 ++--- packages/spec/specs/paths/presets/preset.yaml | 38 ++-- .../spec/specs/paths/presets/presets.yaml | 44 ++-- .../spec/specs/paths/relations/relation.yaml | 56 ++--- .../spec/specs/paths/relations/relations.yaml | 50 ++--- .../spec/specs/paths/revisions/revision.yaml | 20 +- .../spec/specs/paths/revisions/revisions.yaml | 32 +-- packages/spec/specs/paths/roles/role.yaml | 53 ++--- packages/spec/specs/paths/roles/roles.yaml | 53 ++--- packages/spec/specs/paths/scim/group.yaml | 38 ++-- packages/spec/specs/paths/scim/groups.yaml | 65 +++--- packages/spec/specs/paths/scim/user.yaml | 69 +++--- packages/spec/specs/paths/scim/users.yaml | 29 +-- packages/spec/specs/paths/server/info.yaml | 24 +-- .../spec/specs/paths/settings/setting.yaml | 46 ++-- .../spec/specs/paths/settings/settings.yaml | 48 ++--- packages/spec/specs/paths/users/me.yaml | 18 +- .../specs/paths/users/user-invite-token.yaml | 14 +- .../spec/specs/paths/users/user-invite.yaml | 17 +- .../spec/specs/paths/users/user-tracking.yaml | 17 +- packages/spec/specs/paths/users/user.yaml | 50 ++--- packages/spec/specs/paths/users/users.yaml | 48 ++--- .../spec/specs/paths/webhooks/webhooks.yaml | 14 +- 58 files changed, 970 insertions(+), 936 deletions(-) create mode 100644 packages/spec/specs/paths/activity/activities.yaml delete mode 100644 packages/spec/specs/paths/activity/activitys.yaml diff --git a/packages/spec/specs/components/activity.yaml b/packages/spec/specs/components/activity.yaml index b42843f34f..0b61752148 100644 --- a/packages/spec/specs/components/activity.yaml +++ b/packages/spec/specs/components/activity.yaml @@ -8,15 +8,25 @@ properties: description: Action that was performed. example: update type: string - enum: [authenticate, comment, upload, create, update, delete, soft-delete, revert, invalid-credentials] + enum: + [ + authenticate, + comment, + upload, + create, + update, + delete, + soft-delete, + revert, + invalid-credentials, + ] action_by: - description: Unique identifier of the user account who caused this action. - example: 63716273-0f29-4648-8a2a-2af2948f6f78 - type: string + $ref: "./user.yaml" + description: The user who caused this action. nullable: true # States the SQL structure action_on: description: When the action happened. - example: '2019-12-05 22:52:09' + example: "2019-12-05 22:52:09" type: string format: date-time ip: @@ -37,11 +47,12 @@ properties: type: string item: description: Unique identifier for the item the action applied to. This is always a string, even for integer primary keys. - example: '328' + example: "328" type: string comment: - description: User comment. This will store the comments that show up in the right + description: + User comment. This will store the comments that show up in the right sidebar of the item edit page in the admin app. example: null type: string - nullable: true \ No newline at end of file + nullable: true diff --git a/packages/spec/specs/components/user.yaml b/packages/spec/specs/components/user.yaml index aee4d712c2..d1eb942c50 100644 --- a/packages/spec/specs/components/user.yaml +++ b/packages/spec/specs/components/user.yaml @@ -1,5 +1,31 @@ type: object properties: + id: + description: Unique identifier for the user. + example: 63716273-0f29-4648-8a2a-2af2948f6f78 + type: string + first_name: + description: First name of the user. + example: Admin + type: string + last_name: + description: First name of the user. + example: User + type: string + email: + description: Unique email address for the user. + example: admin@example.com + type: string + format: email + password: + description: Password of the user. + example: "*********" + type: string + location: + description: Location of the user. + example: null + type: string + nullable: true tfa_secret: description: The 2FA secret string that's used to generate one time passwords. example: null @@ -12,36 +38,19 @@ properties: - type: integer nullable: true - type: string - - $ref: '../openapi.yaml#/components/schemas/File' + - $ref: "../openapi.yaml#/components/schemas/File" nullable: true - email: - description: Unique email address for the user. - example: admin@example.com - type: string - format: email external_id: description: ID used for SCIM. example: null type: string nullable: true - first_name: - description: First name of the user. - example: Admin - type: string - id: - description: Unique identifier for the user. - example: 63716273-0f29-4648-8a2a-2af2948f6f78 - type: string last_login: description: When this user logged in last. - example: '2020-05-31 14:32:37' + example: "2020-05-31 14:32:37" type: string nullable: true format: date-time - last_name: - description: First name of the user. - example: User - type: string last_page: description: Last page that the user was on. example: /my-project/settings/collections/a @@ -73,4 +82,4 @@ properties: description: The user's title. example: null type: string - nullable: true \ No newline at end of file + nullable: true diff --git a/packages/spec/specs/openapi.yaml b/packages/spec/specs/openapi.yaml index 0df514aa82..5c0597253b 100644 --- a/packages/spec/specs/openapi.yaml +++ b/packages/spec/specs/openapi.yaml @@ -6,14 +6,14 @@ info: email: contact@directus.io license: name: GPL-3.0 - url: 'https://www.gnu.org/licenses/gpl-3.0.de.html' + url: "https://www.gnu.org/licenses/gpl-3.0.de.html" version: 1.0.0 externalDocs: description: Directus Docs - url: 'https://docs.directus.io' + url: "https://docs.directus.io" servers: - - url: 'https://demo.directus.io/' - - url: '/' + - url: "https://demo.directus.io/" + - url: "/" tags: - name: Activity description: All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens. @@ -60,233 +60,232 @@ tags: - name: Webhooks description: Webhooks. paths: - # Activity /activity: - $ref: './paths/activity/activitys.yaml' + $ref: "./paths/activity/activities.yaml" /activity/comment: - $ref: './paths/activity/activity-comments.yaml' + $ref: "./paths/activity/activity-comments.yaml" /activity/{id}: - $ref: './paths/activity/activity.yaml' + $ref: "./paths/activity/activity.yaml" /activity/comment/{id}: - $ref: './paths/activity/activity-comment.yaml' + $ref: "./paths/activity/activity-comment.yaml" # Assets /assets/{key}: - $ref: './paths/assets/assets.yaml' + $ref: "./paths/assets/assets.yaml" # Authentication /auth/login: - $ref: './paths/auth/login.yaml' + $ref: "./paths/auth/login.yaml" /auth/refresh: - $ref: './paths/auth/refresh.yaml' + $ref: "./paths/auth/refresh.yaml" /auth/logout: - $ref: './paths/auth/logout.yaml' + $ref: "./paths/auth/logout.yaml" /auth/password/request: - $ref: './paths/auth/password-request.yaml' + $ref: "./paths/auth/password-request.yaml" /auth/password/reset: - $ref: './paths/auth/password-reset.yaml' + $ref: "./paths/auth/password-reset.yaml" /auth/sso: - $ref: './paths/auth/sso.yaml' + $ref: "./paths/auth/sso.yaml" /auth/sso/{provider}: - $ref: './paths/auth/sso-provider.yaml' + $ref: "./paths/auth/sso-provider.yaml" # Items /items/{collection}: - $ref: './paths/items/items.yaml' + $ref: "./paths/items/items.yaml" /items/{collection}/{id}: - $ref: './paths/items/item.yaml' + $ref: "./paths/items/item.yaml" # Presets /presets: - $ref: './paths/presets/presets.yaml' + $ref: "./paths/presets/presets.yaml" /presets/{id}: - $ref: './paths/presets/preset.yaml' + $ref: "./paths/presets/preset.yaml" # Collections /collections: - $ref: './paths/collections/collections.yaml' + $ref: "./paths/collections/collections.yaml" /collections/{collection}: - $ref: './paths/collections/collection.yaml' - + $ref: "./paths/collections/collection.yaml" + # Extensions /interfaces: - $ref: './paths/extensions/interfaces.yaml' + $ref: "./paths/extensions/interfaces.yaml" /layouts: - $ref: './paths/extensions/layouts.yaml' + $ref: "./paths/extensions/layouts.yaml" /modules: - $ref: './paths/extensions/modules.yaml' + $ref: "./paths/extensions/modules.yaml" # Fields /fields: - $ref: './paths/fields/fields.yaml' + $ref: "./paths/fields/fields.yaml" /fields/{collection}: - $ref: './paths/fields/collection-fields.yaml' + $ref: "./paths/fields/collection-fields.yaml" /fields/{collection}/{field}: - $ref: './paths/fields/collection-field.yaml' + $ref: "./paths/fields/collection-field.yaml" # Files /files: - $ref: './paths/files/files.yaml' + $ref: "./paths/files/files.yaml" /files/{id}: - $ref: './paths/files/file.yaml' + $ref: "./paths/files/file.yaml" /files/{id}/revisions: - $ref: './paths/files/revisions.yaml' + $ref: "./paths/files/revisions.yaml" /files/{id}/revisions/{offset}: - $ref: './paths/files/revision.yaml' + $ref: "./paths/files/revision.yaml" # Folders /folders: - $ref: './paths/folders/folders.yaml' + $ref: "./paths/folders/folders.yaml" /folders/{id}: - $ref: './paths/folders/folder.yaml' + $ref: "./paths/folders/folder.yaml" # Mail /mail: - $ref: './paths/mail/mail.yaml' + $ref: "./paths/mail/mail.yaml" # Permissions /permissions: - $ref: './paths/permissions/permissions.yaml' + $ref: "./paths/permissions/permissions.yaml" /permissions/me: - $ref: './paths/permissions/permissions-me.yaml' + $ref: "./paths/permissions/permissions-me.yaml" /permissions/{id}: - $ref: './paths/permissions/permission.yaml' + $ref: "./paths/permissions/permission.yaml" /permissions/me/{collection}: - $ref: './paths/permissions/permissions-me-collection.yaml' + $ref: "./paths/permissions/permissions-me-collection.yaml" # Relations /relations: - $ref: './paths/relations/relations.yaml' + $ref: "./paths/relations/relations.yaml" /relations/{id}: - $ref: './paths/relations/relation.yaml' + $ref: "./paths/relations/relation.yaml" # Revisions /revisions: - $ref: './paths/revisions/revisions.yaml' + $ref: "./paths/revisions/revisions.yaml" /revisions/{id}: - $ref: './paths/revisions/revision.yaml' + $ref: "./paths/revisions/revision.yaml" # Revisions /roles: - $ref: './paths/roles/roles.yaml' + $ref: "./paths/roles/roles.yaml" /roles/{id}: - $ref: './paths/roles/role.yaml' + $ref: "./paths/roles/role.yaml" # SCIM /scim/v2/Users: - $ref: './paths/scim/users.yaml' + $ref: "./paths/scim/users.yaml" /scim/v2/Users/{id}: - $ref: './paths/scim/user.yaml' + $ref: "./paths/scim/user.yaml" /scim/v2/Groups: - $ref: './paths/scim/groups.yaml' + $ref: "./paths/scim/groups.yaml" /scim/v2/Groups/{id}: - $ref: './paths/scim/group.yaml' - + $ref: "./paths/scim/group.yaml" + # Server /server/info: - $ref: './paths/server/info.yaml' + $ref: "./paths/server/info.yaml" servers: - - url: 'https://demo.directus.io/' + - url: "https://demo.directus.io/" /server/ping: - $ref: './paths/server/ping.yaml' + $ref: "./paths/server/ping.yaml" servers: - - url: 'https://demo.directus.io/' + - url: "https://demo.directus.io/" # Settings /settings: - $ref: './paths/settings/settings.yaml' + $ref: "./paths/settings/settings.yaml" # Users /users: - $ref: './paths/users/users.yaml' + $ref: "./paths/users/users.yaml" /users/me: - $ref: './paths/users/me.yaml' + $ref: "./paths/users/me.yaml" /users/invite: - $ref: './paths/users/user-invite.yaml' + $ref: "./paths/users/user-invite.yaml" /users/{id}: - $ref: './paths/users/user.yaml' + $ref: "./paths/users/user.yaml" /users/invite/{token}: - $ref: './paths/users/user-invite-token.yaml' + $ref: "./paths/users/user-invite-token.yaml" /users/{id}/track/page: - $ref: './paths/users/user-tracking.yaml' + $ref: "./paths/users/user-tracking.yaml" # Utilities /utils/hash: - $ref: './paths/utils/hash.yaml' + $ref: "./paths/utils/hash.yaml" /utils/hash/verify: - $ref: './paths/utils/hash-match.yaml' + $ref: "./paths/utils/hash-match.yaml" /utils/random/string: - $ref: './paths/utils/random.yaml' + $ref: "./paths/utils/random.yaml" # Webhooks /webhooks: - $ref: './paths/webhooks/webhooks.yaml' + $ref: "./paths/webhooks/webhooks.yaml" components: schemas: Activity: - $ref: './components/activity.yaml' + $ref: "./components/activity.yaml" Preset: - $ref: './components/preset.yaml' + $ref: "./components/preset.yaml" Collection: - $ref: './components/collection.yaml' + $ref: "./components/collection.yaml" Field: - $ref: './components/field.yaml' + $ref: "./components/field.yaml" File: - $ref: './components/file.yaml' + $ref: "./components/file.yaml" Folder: - $ref: './components/folder.yaml' + $ref: "./components/folder.yaml" Item: - $ref: './components/item.yaml' + $ref: "./components/item.yaml" Permissions: - $ref: './components/permissions.yaml' + $ref: "./components/permissions.yaml" Relation: - $ref: './components/relation.yaml' + $ref: "./components/relation.yaml" Revision: - $ref: './components/revision.yaml' + $ref: "./components/revision.yaml" Role: - $ref: './components/role.yaml' + $ref: "./components/role.yaml" Setting: - $ref: './components/setting.yaml' + $ref: "./components/setting.yaml" User: - $ref: './components/user.yaml' + $ref: "./components/user.yaml" Webhook: - $ref: './components/webhook.yaml' + $ref: "./components/webhook.yaml" parameters: - # All path parameters + # All path parameters Id: - $ref: './parameters/id.yaml' + $ref: "./parameters/id.yaml" UUId: - $ref: './parameters/uuid.yaml' + $ref: "./parameters/uuid.yaml" Collection: - $ref: './parameters/collection.yaml' + $ref: "./parameters/collection.yaml" # All query parameters q: - $ref: './parameters/q.yaml' + $ref: "./parameters/q.yaml" Page: - $ref: './parameters/page.yaml' + $ref: "./parameters/page.yaml" Offset: - $ref: './parameters/offset.yaml' + $ref: "./parameters/offset.yaml" Single: - $ref: './parameters/single.yaml' + $ref: "./parameters/single.yaml" Sort: - $ref: './parameters/sort.yaml' + $ref: "./parameters/sort.yaml" Meta: - $ref: './parameters/meta.yaml' + $ref: "./parameters/meta.yaml" Limit: - $ref: './parameters/limit.yaml' + $ref: "./parameters/limit.yaml" Filter: - $ref: './parameters/filter.yaml' + $ref: "./parameters/filter.yaml" Fields: - $ref: './parameters/fields.yaml' + $ref: "./parameters/fields.yaml" Mode: - $ref: './parameters/mode.yaml' + $ref: "./parameters/mode.yaml" responses: NotFoundError: - $ref: './responses/notFoundError.yaml' + $ref: "./responses/notFoundError.yaml" UnauthorizedError: - $ref: './responses/unauthorizedError.yaml' + $ref: "./responses/unauthorizedError.yaml" securitySchemes: KeyAuth: type: apiKey @@ -296,8 +295,8 @@ components: Auth: type: apiKey in: header - name: 'Authorization' + name: "Authorization" description: To authenticate, use the "/auth/authenticate" endpoint with the credentials "admin@example.com" | "password". Use the api key here like so "Bearer \". -security: +security: - Auth: [] - KeyAuth: [] diff --git a/packages/spec/specs/paths/activity/activities.yaml b/packages/spec/specs/paths/activity/activities.yaml new file mode 100644 index 0000000000..0a191d164b --- /dev/null +++ b/packages/spec/specs/paths/activity/activities.yaml @@ -0,0 +1,30 @@ +get: + operationId: getActivities + description: Returns a list of activity actions. + parameters: + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Meta" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" + responses: + "200": + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Activity" + description: Successful request + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" + tags: + - Activity diff --git a/packages/spec/specs/paths/activity/activity-comment.yaml b/packages/spec/specs/paths/activity/activity-comment.yaml index d79f1da118..d32eb485ed 100644 --- a/packages/spec/specs/paths/activity/activity-comment.yaml +++ b/packages/spec/specs/paths/activity/activity-comment.yaml @@ -2,7 +2,8 @@ patch: description: Update the content of an existing comment. operationId: updateComment parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Id" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -13,32 +14,32 @@ patch: type: string example: My updated comment responses: - '200': + "200": content: application/json: schema: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Activity' + $ref: "#/components/schemas/Activity" description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Activity + - Activity delete: description: Delete an existing comment. Deleted comments can not be retrieved. operationId: deleteComment + parameters: + - $ref: "#/components/parameters/Id" responses: - '203': + "203": description: Deleted succsessfully - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Activity -parameters: -- $ref: '../../openapi.yaml#/components/parameters/Id' \ No newline at end of file + - Activity diff --git a/packages/spec/specs/paths/activity/activity-comments.yaml b/packages/spec/specs/paths/activity/activity-comments.yaml index e9046aaf8b..a625519f55 100644 --- a/packages/spec/specs/paths/activity/activity-comments.yaml +++ b/packages/spec/specs/paths/activity/activity-comments.yaml @@ -2,13 +2,13 @@ post: description: Creates a new comment. operationId: createComment parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: schema: type: object - required: [ "collection", "item", "comment" ] + required: ["collection", "item", "comment"] properties: collection: type: string @@ -20,18 +20,18 @@ post: type: string example: A new comment responses: - '200': + "200": content: application/json: schema: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Activity' + $ref: "#/components/schemas/Activity" description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Activity \ No newline at end of file + - Activity diff --git a/packages/spec/specs/paths/activity/activity.yaml b/packages/spec/specs/paths/activity/activity.yaml index 95d9bf57aa..2633c05813 100644 --- a/packages/spec/specs/paths/activity/activity.yaml +++ b/packages/spec/specs/paths/activity/activity.yaml @@ -1,13 +1,14 @@ get: - description: Retrieves the details of an existing activity action. Provide the primary + description: + Retrieves the details of an existing activity action. Provide the primary key of the activity action and Directus will return the corresponding information. operationId: getActivity parameters: - - $ref: '../../openapi.yaml#/components/parameters/Id' - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Id" + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -15,10 +16,10 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Activity' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Activity" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Activity \ No newline at end of file + - Activity diff --git a/packages/spec/specs/paths/activity/activitys.yaml b/packages/spec/specs/paths/activity/activitys.yaml deleted file mode 100644 index de6759b239..0000000000 --- a/packages/spec/specs/paths/activity/activitys.yaml +++ /dev/null @@ -1,30 +0,0 @@ -get: - operationId: getActivitys - description: Returns a list of activity actions. - parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Meta' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '../../openapi.yaml#/components/schemas/Activity' - description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' - tags: - - Activity \ No newline at end of file diff --git a/packages/spec/specs/paths/assets/assets.yaml b/packages/spec/specs/paths/assets/assets.yaml index 48aa4886a3..b344658c15 100644 --- a/packages/spec/specs/paths/assets/assets.yaml +++ b/packages/spec/specs/paths/assets/assets.yaml @@ -3,7 +3,7 @@ get: - Assets operationId: getAsset description: Image typed files can be dynamically resized and transformed to fit any need. - security: + security: - Auth: [] parameters: - name: key @@ -41,11 +41,11 @@ get: minimum: 1 maximum: 100 responses: - '200': + "200": description: Successful request content: text/plain: schema: type: string - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' \ No newline at end of file + "404": + $ref: "#/components/responses/NotFoundError" diff --git a/packages/spec/specs/paths/auth/login.yaml b/packages/spec/specs/paths/auth/login.yaml index 4630356887..7cdd4c4002 100644 --- a/packages/spec/specs/paths/auth/login.yaml +++ b/packages/spec/specs/paths/auth/login.yaml @@ -8,7 +8,7 @@ post: application/json: schema: type: object - required: [ email, password ] + required: [email, password] properties: email: type: string @@ -28,19 +28,19 @@ post: type: string description: If 2FA is enabled, you need to pass the one time password. responses: - '200': + "200": description: Successful authentification content: application/json: schema: type: object properties: - public: - type: boolean data: type: object properties: - token: + access_token: type: string - user: - $ref: '../../openapi.yaml#/components/schemas/User' \ No newline at end of file + example: eyJhbGciOiJI... + expires: + type: integer + example: 900 diff --git a/packages/spec/specs/paths/auth/password-request.yaml b/packages/spec/specs/paths/auth/password-request.yaml index e9a839f851..71637a4278 100644 --- a/packages/spec/specs/paths/auth/password-request.yaml +++ b/packages/spec/specs/paths/auth/password-request.yaml @@ -8,7 +8,7 @@ post: application/json: schema: type: object - required: [ email ] + required: [email] properties: email: type: string @@ -19,5 +19,5 @@ post: example: https://mydomain.com/passwordreset description: Provide a custom reset url which the link in the Email will lead to. The reset token will be passed as a parameter. responses: - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/auth/password-reset.yaml b/packages/spec/specs/paths/auth/password-reset.yaml index 2f5530d739..750844c193 100644 --- a/packages/spec/specs/paths/auth/password-reset.yaml +++ b/packages/spec/specs/paths/auth/password-reset.yaml @@ -8,7 +8,7 @@ post: application/json: schema: type: object - required: [ token, password ] + required: [token, password] properties: token: type: string @@ -20,5 +20,5 @@ post: format: password description: New password for the user. responses: - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/auth/refresh.yaml b/packages/spec/specs/paths/auth/refresh.yaml index c2074d85ef..3dcc7becf3 100644 --- a/packages/spec/specs/paths/auth/refresh.yaml +++ b/packages/spec/specs/paths/auth/refresh.yaml @@ -8,26 +8,28 @@ post: application/json: schema: type: object - required: [ token ] + required: [token] properties: refresh_token: type: string example: eyJ0eXAiOiJKV... description: JWT access token you want to refresh. This token can't be expired. responses: - '200': + "200": description: Successful request content: application/json: schema: type: object properties: - public: - type: boolean data: type: object properties: - token: + access_token: type: string - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + example: eyJhbGciOiJI... + expires: + type: integer + example: 900 + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/auth/sso-provider.yaml b/packages/spec/specs/paths/auth/sso-provider.yaml index 6d5d0f48a1..acaedbed64 100644 --- a/packages/spec/specs/paths/auth/sso-provider.yaml +++ b/packages/spec/specs/paths/auth/sso-provider.yaml @@ -10,7 +10,7 @@ get: required: true schema: type: string - - $ref: '../../openapi.yaml#/components/parameters/Mode' + - $ref: "#/components/parameters/Mode" - name: redirect_url in: query required: true @@ -18,7 +18,7 @@ get: schema: type: string responses: - '200': + "200": description: Successful request content: application/json: @@ -32,5 +32,5 @@ get: properties: token: type: string - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/auth/sso.yaml b/packages/spec/specs/paths/auth/sso.yaml index 14d0283fc4..21cd78770f 100644 --- a/packages/spec/specs/paths/auth/sso.yaml +++ b/packages/spec/specs/paths/auth/sso.yaml @@ -4,7 +4,7 @@ get: operationId: sso description: List the SSO providers. responses: - '200': + "200": description: Successful request content: application/json: @@ -18,5 +18,5 @@ get: example: ["github", "facebook"] items: type: string - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/collections/collection.yaml b/packages/spec/specs/paths/collections/collection.yaml index 43ab3eee50..c03d5fba1e 100644 --- a/packages/spec/specs/paths/collections/collection.yaml +++ b/packages/spec/specs/paths/collections/collection.yaml @@ -2,28 +2,28 @@ get: description: Retrieves the details of a single collection. operationId: getCollection parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": content: application/json: schema: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Collection' + $ref: "#/components/schemas/Collection" description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Collections + - Collections patch: description: Update an existing collection. operationId: updateCollection parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -49,37 +49,37 @@ patch: type: object description: Key value pairs of how to show this collection's name in different languages in the admin app. responses: - '200': + "200": content: application/json: schema: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Collection' + $ref: "#/components/schemas/Collection" description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Collections + - Collections delete: description: "Delete an existing collection. Warning: This will delete the whole collection, including the items within. Proceed with caution." operationId: deleteCollection responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Collections + - Collections parameters: - name: collection in: path required: true description: The unique name of the collection. schema: - type: string \ No newline at end of file + type: string diff --git a/packages/spec/specs/paths/collections/collections.yaml b/packages/spec/specs/paths/collections/collections.yaml index 0412d50783..abad097537 100644 --- a/packages/spec/specs/paths/collections/collections.yaml +++ b/packages/spec/specs/paths/collections/collections.yaml @@ -2,11 +2,11 @@ get: description: Returns a list of the collections available in the project. operationId: getCollections parameters: - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -16,24 +16,24 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Collection' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Collection" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Collections + - Collections post: description: Create a new collection in Directus. operationId: createCollection parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: schema: type: object - required: [ collection, fields ] + required: [collection, fields] properties: collection: type: string @@ -61,18 +61,18 @@ post: type: string description: Key value pairs of how to show this collection's name in different languages in the admin app. responses: - '200': + "200": content: application/json: schema: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Collection' + $ref: "#/components/schemas/Collection" description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Collections \ No newline at end of file + - Collections diff --git a/packages/spec/specs/paths/extensions/interfaces.yaml b/packages/spec/specs/paths/extensions/interfaces.yaml index 199e5bcfd7..9bc69c119f 100644 --- a/packages/spec/specs/paths/extensions/interfaces.yaml +++ b/packages/spec/specs/paths/extensions/interfaces.yaml @@ -2,7 +2,7 @@ get: description: List all installed custom interfaces. operationId: getInterfaces responses: - '200': + "200": description: Successful request content: application/json: @@ -13,9 +13,9 @@ get: type: array items: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Extensions \ No newline at end of file + - Extensions diff --git a/packages/spec/specs/paths/extensions/layouts.yaml b/packages/spec/specs/paths/extensions/layouts.yaml index e3c336dea6..2192650948 100644 --- a/packages/spec/specs/paths/extensions/layouts.yaml +++ b/packages/spec/specs/paths/extensions/layouts.yaml @@ -2,7 +2,7 @@ get: description: List all installed custom layouts. operationId: getLayouts responses: - '200': + "200": content: application/json: schema: @@ -13,9 +13,9 @@ get: items: type: object description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Extensions \ No newline at end of file + - Extensions diff --git a/packages/spec/specs/paths/extensions/modules.yaml b/packages/spec/specs/paths/extensions/modules.yaml index b84aa75ea6..8c9254a932 100644 --- a/packages/spec/specs/paths/extensions/modules.yaml +++ b/packages/spec/specs/paths/extensions/modules.yaml @@ -2,7 +2,7 @@ get: description: List all installed custom modules. operationId: getModules responses: - '200': + "200": content: application/json: schema: @@ -13,9 +13,9 @@ get: items: type: object description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Extensions \ No newline at end of file + - Extensions diff --git a/packages/spec/specs/paths/fields/collection-field.yaml b/packages/spec/specs/paths/fields/collection-field.yaml index bf1ba19a98..a275fcafb8 100644 --- a/packages/spec/specs/paths/fields/collection-field.yaml +++ b/packages/spec/specs/paths/fields/collection-field.yaml @@ -2,7 +2,7 @@ get: description: Retrieves the details of a single field in a given collection. operationId: getCollectionField responses: - '200': + "200": description: Successful request content: application/json: @@ -10,13 +10,13 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Field' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Field" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Fields + - Fields patch: description: Update an existing field. operationId: updateField @@ -68,7 +68,7 @@ patch: description: Sort order of this field on the edit page of the admin app. type: integer translation: - description: 'Key value pair of `: ` that allows the user to change the displayed name of the field in the admin app.' + description: "Key value pair of `: ` that allows the user to change the displayed name of the field in the admin app." type: object unique: description: If the value of this field should be unique within the collection. @@ -85,7 +85,7 @@ patch: type: integer type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -93,26 +93,26 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Field' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Field" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Fields + - Fields delete: description: Delete an existing field. operationId: deleteField responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Fields + - Fields parameters: - name: collection in: path @@ -125,4 +125,4 @@ parameters: description: The unique name of the field. schema: type: string - required: true \ No newline at end of file + required: true diff --git a/packages/spec/specs/paths/fields/collection-fields.yaml b/packages/spec/specs/paths/fields/collection-fields.yaml index b619042720..283966d2cb 100644 --- a/packages/spec/specs/paths/fields/collection-fields.yaml +++ b/packages/spec/specs/paths/fields/collection-fields.yaml @@ -2,9 +2,9 @@ get: description: Returns a list of the fields available in the given collection. operationId: getCollectionFields parameters: - - $ref: '../../openapi.yaml#/components/parameters/Sort' + - $ref: "#/components/parameters/Sort" responses: - '200': + "200": description: Successful request content: application/json: @@ -14,13 +14,13 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Field' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Field" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Fields + - Fields post: description: Create a new field in a given collection. operationId: createField @@ -28,7 +28,7 @@ post: content: application/json: schema: - required: [ field, datatype, type, length ] + required: [field, datatype, type, length] properties: field: description: Unique name of the field. Field name is unique within the collection. @@ -79,7 +79,7 @@ post: description: Sort order of this field on the edit page of the admin app. type: integer translation: - description: 'Key value pair of `: ` that allows the user to change the displayed name of the field in the admin app.' + description: "Key value pair of `: ` that allows the user to change the displayed name of the field in the admin app." type: object unique: description: If the value of this field should be unique within the collection. @@ -96,25 +96,25 @@ post: type: integer type: object responses: - '200': + "200": content: application/json: schema: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Field' + $ref: "#/components/schemas/Field" description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Fields + - Fields parameters: - description: Unique identifier of the collection the item resides in. in: path name: collection required: true schema: - type: string \ No newline at end of file + type: string diff --git a/packages/spec/specs/paths/fields/fields.yaml b/packages/spec/specs/paths/fields/fields.yaml index 1b893014ac..41783cdded 100644 --- a/packages/spec/specs/paths/fields/fields.yaml +++ b/packages/spec/specs/paths/fields/fields.yaml @@ -2,10 +2,10 @@ get: description: Returns a list of the fields available in the project. operationId: getFields parameters: - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Sort' + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Sort" responses: - '200': + "200": description: Successful request content: application/json: @@ -15,10 +15,10 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Field' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Field" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Fields \ No newline at end of file + - Fields diff --git a/packages/spec/specs/paths/files/file.yaml b/packages/spec/specs/paths/files/file.yaml index 415848c69a..a29d2fd707 100644 --- a/packages/spec/specs/paths/files/file.yaml +++ b/packages/spec/specs/paths/files/file.yaml @@ -4,7 +4,7 @@ get: - Files operationId: getFile responses: - '200': + "200": description: Successful request content: application/json: @@ -12,9 +12,9 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/File' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + $ref: "#/components/schemas/File" + "401": + $ref: "#/components/responses/UnauthorizedError" patch: description: Update an existing file. tags: @@ -26,7 +26,7 @@ patch: schema: type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -34,18 +34,18 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/File' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + $ref: "#/components/schemas/File" + "401": + $ref: "#/components/responses/UnauthorizedError" delete: description: Delete an existing file. tags: - Files operationId: deleteFile responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + "401": + $ref: "#/components/responses/UnauthorizedError" parameters: - - $ref: '../../openapi.yaml#/components/parameters/Id' \ No newline at end of file + - $ref: "#/components/parameters/Id" diff --git a/packages/spec/specs/paths/files/files.yaml b/packages/spec/specs/paths/files/files.yaml index 83512ee80c..9bac99e8d6 100644 --- a/packages/spec/specs/paths/files/files.yaml +++ b/packages/spec/specs/paths/files/files.yaml @@ -4,7 +4,7 @@ get: - Files operationId: getFiles responses: - '200': + "200": description: Successful request content: application/json: @@ -14,9 +14,9 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/File' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + $ref: "#/components/schemas/File" + "401": + $ref: "#/components/responses/UnauthorizedError" post: description: Create a new file. tags: @@ -31,7 +31,7 @@ post: data: type: string responses: - '200': + "200": description: Successful request content: application/json: @@ -39,6 +39,6 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/File' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + $ref: "#/components/schemas/File" + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/files/revision.yaml b/packages/spec/specs/paths/files/revision.yaml index 962a3177b5..6e425fbbf9 100644 --- a/packages/spec/specs/paths/files/revision.yaml +++ b/packages/spec/specs/paths/files/revision.yaml @@ -4,7 +4,7 @@ get: - Files operationId: getFileRevision parameters: - - $ref: '../../openapi.yaml#/components/parameters/UUId' + - $ref: "#/components/parameters/UUId" - name: offset in: path description: offset or revision @@ -12,7 +12,7 @@ get: schema: type: integer responses: - '200': + "200": description: Successful request content: application/json: @@ -20,6 +20,6 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Revision' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + $ref: "#/components/schemas/Revision" + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/files/revisions.yaml b/packages/spec/specs/paths/files/revisions.yaml index eb6e56a072..fe5b119eed 100644 --- a/packages/spec/specs/paths/files/revisions.yaml +++ b/packages/spec/specs/paths/files/revisions.yaml @@ -4,9 +4,9 @@ get: - Files operationId: getFileRevisions parameters: - - $ref: '../../openapi.yaml#/components/parameters/UUId' + - $ref: "#/components/parameters/UUId" responses: - '200': + "200": description: Successful request content: application/json: @@ -16,6 +16,6 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Revision' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + $ref: "#/components/schemas/Revision" + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/folders/folder.yaml b/packages/spec/specs/paths/folders/folder.yaml index e6ea23539a..09f884797e 100644 --- a/packages/spec/specs/paths/folders/folder.yaml +++ b/packages/spec/specs/paths/folders/folder.yaml @@ -2,10 +2,10 @@ get: description: Retrieve a single folder by unique identifier. operationId: getFolder parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -13,19 +13,19 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Folder' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Folder" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Folders + - Folders patch: description: Update an existing folder operationId: updateFolder parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -40,7 +40,7 @@ patch: example: 3 description: Unique identifier of the parent folder. This allows for nested folders. responses: - '200': + "200": description: Successful request content: application/json: @@ -48,25 +48,25 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Folder' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Folder" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Folders + - Folders delete: description: Delete an existing folder operationId: deleteFolder responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Folders + - Folders parameters: - - $ref: '../../openapi.yaml#/components/parameters/UUId' \ No newline at end of file + - $ref: "#/components/parameters/UUId" diff --git a/packages/spec/specs/paths/folders/folders.yaml b/packages/spec/specs/paths/folders/folders.yaml index 5b38caca4e..44f8f83eb4 100644 --- a/packages/spec/specs/paths/folders/folders.yaml +++ b/packages/spec/specs/paths/folders/folders.yaml @@ -2,16 +2,16 @@ get: description: List the folders. operationId: getFolders parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -21,19 +21,19 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Folder' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Folder" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Folders + - Folders post: description: Create a new folder. operationId: createFolder parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -49,7 +49,7 @@ post: type: integer required: [name] responses: - '200': + "200": description: Successful request content: application/json: @@ -57,10 +57,10 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Folder' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Folder" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Folders \ No newline at end of file + - Folders diff --git a/packages/spec/specs/paths/items/item.yaml b/packages/spec/specs/paths/items/item.yaml index 8f4147382f..66731f370d 100644 --- a/packages/spec/specs/paths/items/item.yaml +++ b/packages/spec/specs/paths/items/item.yaml @@ -4,10 +4,10 @@ get: - Items operationId: getItem parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -16,25 +16,25 @@ get: properties: data: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" patch: description: Update an existing item. tags: - Items operationId: updateItem parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: schema: type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -43,24 +43,24 @@ patch: properties: data: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" delete: description: Delete an existing item. tags: - Items operationId: deleteItem responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" parameters: - - $ref: '../../openapi.yaml#/components/parameters/Collection' + - $ref: "#/components/parameters/Collection" - name: id description: Index of the item. in: path @@ -72,4 +72,4 @@ parameters: example: 1 - type: string description: Unique identifier of the item. - example: 8cbb43fe-4cdf-4991-8352-c461779cec02 \ No newline at end of file + example: 8cbb43fe-4cdf-4991-8352-c461779cec02 diff --git a/packages/spec/specs/paths/items/items.yaml b/packages/spec/specs/paths/items/items.yaml index 7f08c07e17..5188c6c356 100644 --- a/packages/spec/specs/paths/items/items.yaml +++ b/packages/spec/specs/paths/items/items.yaml @@ -3,17 +3,17 @@ get: tags: - Items operationId: getItems - security: + security: - Auth: [] parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Meta' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Meta" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" - name: status in: query description: Filter items by the given status @@ -23,7 +23,7 @@ get: items: type: string responses: - '200': + "200": description: Successful request content: application/json: @@ -34,28 +34,28 @@ get: type: array items: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + "401": + $ref: "#/components/responses/UnauthorizedError" post: description: Create a new item. tags: - Items operationId: createItem parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: schema: type: object responses: - '200': + "200": description: Successful request content: application/json: schema: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + "401": + $ref: "#/components/responses/UnauthorizedError" parameters: - - $ref: '../../openapi.yaml#/components/parameters/Collection' \ No newline at end of file + - $ref: "#/components/parameters/Collection" diff --git a/packages/spec/specs/paths/mail/mail.yaml b/packages/spec/specs/paths/mail/mail.yaml index 7b4a4db6da..45f71a0371 100644 --- a/packages/spec/specs/paths/mail/mail.yaml +++ b/packages/spec/specs/paths/mail/mail.yaml @@ -38,15 +38,15 @@ post: type: string enum: [html, text] responses: - '200': + "200": content: application/json: schema: type: string description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Mail \ No newline at end of file + - Mail diff --git a/packages/spec/specs/paths/permissions/permission.yaml b/packages/spec/specs/paths/permissions/permission.yaml index 1238a461b3..de675ee843 100644 --- a/packages/spec/specs/paths/permissions/permission.yaml +++ b/packages/spec/specs/paths/permissions/permission.yaml @@ -2,10 +2,10 @@ get: description: Retrieve a single permissions object by unique identifier. operationId: getPermission parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -13,18 +13,18 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Permissions' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Permissions" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Permissions + - Permissions patch: description: Update an existing permission operationId: updatePermission parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -75,7 +75,7 @@ patch: type: object type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -83,24 +83,24 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Permissions' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Permissions" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Permissions + - Permissions delete: description: Delete an existing permission operationId: deletePermission responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Permissions + - Permissions parameters: - - $ref: '../../openapi.yaml#/components/parameters/Id' \ No newline at end of file + - $ref: "#/components/parameters/Id" diff --git a/packages/spec/specs/paths/permissions/permissions-me-collection.yaml b/packages/spec/specs/paths/permissions/permissions-me-collection.yaml index 724ab3de77..4e9b85d903 100644 --- a/packages/spec/specs/paths/permissions/permissions-me-collection.yaml +++ b/packages/spec/specs/paths/permissions/permissions-me-collection.yaml @@ -2,9 +2,9 @@ get: description: List the permissions that apply to the current user for the given collection operationId: Enter text here parameters: - - $ref: '../../openapi.yaml#/components/parameters/Collection' + - $ref: "#/components/parameters/Collection" responses: - '200': + "200": description: Successful request content: application/json: @@ -14,10 +14,10 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Permissions' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Permissions" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Permissions \ No newline at end of file + - Permissions diff --git a/packages/spec/specs/paths/permissions/permissions-me.yaml b/packages/spec/specs/paths/permissions/permissions-me.yaml index efb11ed592..affa2f9216 100644 --- a/packages/spec/specs/paths/permissions/permissions-me.yaml +++ b/packages/spec/specs/paths/permissions/permissions-me.yaml @@ -2,7 +2,7 @@ get: description: List the permissions that apply to the current user. operationId: getMyPermissions responses: - '200': + "200": description: Successful request content: application/json: @@ -12,10 +12,10 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Permissions' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Permissions" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Permissions \ No newline at end of file + - Permissions diff --git a/packages/spec/specs/paths/permissions/permissions.yaml b/packages/spec/specs/paths/permissions/permissions.yaml index 3d93dc9f30..cb369ffbc0 100644 --- a/packages/spec/specs/paths/permissions/permissions.yaml +++ b/packages/spec/specs/paths/permissions/permissions.yaml @@ -2,17 +2,17 @@ get: description: List all permissions. operationId: getPermissions parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Meta' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' - - $ref: '../../openapi.yaml#/components/parameters/Page' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Meta" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" + - $ref: "#/components/parameters/Page" responses: - '200': + "200": description: Successful request content: application/json: @@ -22,18 +22,18 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Permissions' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Permissions" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Permissions + - Permissions post: description: Create a new permission. operationId: createPermission parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -72,7 +72,7 @@ post: type: array items: type: string - example: ['featured_image'] + example: ["featured_image"] status: description: What status this permission applies to. type: string @@ -92,7 +92,7 @@ post: type: string type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -100,10 +100,10 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Permissions' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Permissions" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Permissions \ No newline at end of file + - Permissions diff --git a/packages/spec/specs/paths/presets/preset.yaml b/packages/spec/specs/paths/presets/preset.yaml index 3382bb5d53..cfe3d531b4 100644 --- a/packages/spec/specs/paths/presets/preset.yaml +++ b/packages/spec/specs/paths/presets/preset.yaml @@ -3,13 +3,13 @@ get: - Presets operationId: getPreset description: Retrieve a single preset by unique identifier. - security: + security: - Auth: [] parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -17,23 +17,23 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Preset' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + $ref: "#/components/schemas/Preset" + "401": + $ref: "#/components/responses/UnauthorizedError" patch: tags: - Presets operationId: updatePreset description: Update an existing preset. parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: schema: type: object - required: [ collection ] + required: [collection] properties: collection: type: string @@ -60,7 +60,7 @@ patch: operator: type: string example: gte - value: + value: type: integer example: 4.5 view_type: @@ -76,7 +76,7 @@ patch: type: object description: Key value pair of language-translation. Can be used to translate the bookmark title in multiple languages. responses: - '200': + "200": description: Successful request content: application/json: @@ -84,9 +84,9 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Preset' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + $ref: "#/components/schemas/Preset" + "401": + $ref: "#/components/responses/UnauthorizedError" delete: tags: - Presets @@ -95,9 +95,9 @@ delete: security: - Auth: [] responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + "401": + $ref: "#/components/responses/UnauthorizedError" parameters: - - $ref: '../../openapi.yaml#/components/parameters/Id' \ No newline at end of file + - $ref: "#/components/parameters/Id" diff --git a/packages/spec/specs/paths/presets/presets.yaml b/packages/spec/specs/paths/presets/presets.yaml index c02ee8c185..fdb8923b98 100644 --- a/packages/spec/specs/paths/presets/presets.yaml +++ b/packages/spec/specs/paths/presets/presets.yaml @@ -3,20 +3,20 @@ get: - Presets operationId: getPresets description: List the presets. - security: + security: - Auth: [] parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Page' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Page" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -26,23 +26,23 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Preset' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' + $ref: "#/components/schemas/Preset" + "401": + $ref: "#/components/responses/UnauthorizedError" post: tags: - Presets operationId: createPreset description: Create a new preset. parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: schema: type: object - required: [ collection ] + required: [collection] properties: collection: type: string @@ -69,7 +69,7 @@ post: operator: type: string example: gte - value: + value: type: integer example: 4.5 view_type: @@ -85,7 +85,7 @@ post: type: object description: Key value pair of language-translation. Can be used to translate the bookmark title in multiple languages. responses: - '200': + "200": description: Successful request content: application/json: @@ -93,6 +93,6 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Preset' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' \ No newline at end of file + $ref: "#/components/schemas/Preset" + "401": + $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/relations/relation.yaml b/packages/spec/specs/paths/relations/relation.yaml index dd7f0ed240..257c25186c 100644 --- a/packages/spec/specs/paths/relations/relation.yaml +++ b/packages/spec/specs/paths/relations/relation.yaml @@ -2,10 +2,10 @@ get: description: Retrieve a single relation by unique identifier. operationId: getRelation parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -13,19 +13,19 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Relation' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Relation" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Relations + - Relations patch: description: Update an existing relation operationId: updateRelation parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -38,7 +38,8 @@ patch: description: Collection on the _one_ side of the relationship. type: string field_many: - description: Foreign key. Field that holds the primary key of the related + description: + Foreign key. Field that holds the primary key of the related collection. type: string field_one: @@ -46,12 +47,13 @@ patch: type: string example: books junction_field: - description: Field on the junction table that holds the primary key of + description: + Field on the junction table that holds the primary key of the related collection. type: string type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -59,24 +61,24 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Relation' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Relation" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Relations + - Relations delete: description: Delete an existing relation. operationId: deleteRelation responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Relations + - Relations parameters: - - $ref: '../../openapi.yaml#/components/parameters/Id' \ No newline at end of file + - $ref: "#/components/parameters/Id" diff --git a/packages/spec/specs/paths/relations/relations.yaml b/packages/spec/specs/paths/relations/relations.yaml index 07c49fc2c0..f0f51bfe13 100644 --- a/packages/spec/specs/paths/relations/relations.yaml +++ b/packages/spec/specs/paths/relations/relations.yaml @@ -2,17 +2,17 @@ get: description: List the relations. operationId: getRelations parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Meta' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' - - $ref: '../../openapi.yaml#/components/parameters/Page' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Meta" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" + - $ref: "#/components/parameters/Page" responses: - '200': + "200": description: Successful request content: application/json: @@ -22,19 +22,19 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Relation' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Relation" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Relations + - Relations post: description: Create a new relation. operationId: createRelation parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -61,7 +61,7 @@ post: type: string type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -69,10 +69,10 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Relation' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Relation" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Relations \ No newline at end of file + - Relations diff --git a/packages/spec/specs/paths/revisions/revision.yaml b/packages/spec/specs/paths/revisions/revision.yaml index d93acacc6f..1af3ed3006 100644 --- a/packages/spec/specs/paths/revisions/revision.yaml +++ b/packages/spec/specs/paths/revisions/revision.yaml @@ -2,11 +2,11 @@ get: description: Retrieve a single revision by unique identifier. operationId: getRevision parameters: - - $ref: '../../openapi.yaml#/components/parameters/Id' - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Id" + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -14,10 +14,10 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Revision' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Revision" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Revisions \ No newline at end of file + - Revisions diff --git a/packages/spec/specs/paths/revisions/revisions.yaml b/packages/spec/specs/paths/revisions/revisions.yaml index c8b28e308b..f612f869d8 100644 --- a/packages/spec/specs/paths/revisions/revisions.yaml +++ b/packages/spec/specs/paths/revisions/revisions.yaml @@ -2,17 +2,17 @@ get: description: List the revisions. operationId: getRevisions parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Meta' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' - - $ref: '../../openapi.yaml#/components/parameters/Page' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Meta" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" + - $ref: "#/components/parameters/Page" responses: - '200': + "200": description: Successful request content: application/json: @@ -22,10 +22,10 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Revision' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Revision" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Revisions \ No newline at end of file + - Revisions diff --git a/packages/spec/specs/paths/roles/role.yaml b/packages/spec/specs/paths/roles/role.yaml index f50a2f2c57..3e4c57521d 100644 --- a/packages/spec/specs/paths/roles/role.yaml +++ b/packages/spec/specs/paths/roles/role.yaml @@ -2,10 +2,10 @@ get: description: Retrieve a single role by unique identifier. operationId: getRole parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -13,19 +13,19 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Role' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Role" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Roles + - Roles patch: description: Update an existing role operationId: updateRole parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -44,7 +44,8 @@ patch: description: ID used with external services in SCIM. type: string ip_whitelist: - description: Array of IP addresses that are allowed to connect to the + description: + Array of IP addresses that are allowed to connect to the API as a user of this role. type: array items: @@ -57,7 +58,7 @@ patch: type: string type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -65,24 +66,24 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Role' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Role" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Roles + - Roles delete: description: Delete an existing role operationId: deleteRole responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Roles + - Roles parameters: - - $ref: '../../openapi.yaml#/components/parameters/UUId' \ No newline at end of file + - $ref: "#/components/parameters/UUId" diff --git a/packages/spec/specs/paths/roles/roles.yaml b/packages/spec/specs/paths/roles/roles.yaml index aca6b7b071..4f7b4afb22 100644 --- a/packages/spec/specs/paths/roles/roles.yaml +++ b/packages/spec/specs/paths/roles/roles.yaml @@ -2,17 +2,17 @@ get: description: List the roles. operationId: getRoles parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Meta' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' - - $ref: '../../openapi.yaml#/components/parameters/Page' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Meta" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" + - $ref: "#/components/parameters/Page" responses: - '200': + "200": description: Successful request content: application/json: @@ -22,19 +22,19 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/Role' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Role" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Roles + - Roles post: description: Create a new role. operationId: createRole parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -53,7 +53,8 @@ post: description: ID used with external services in SCIM. type: string ip_whitelist: - description: Array of IP addresses that are allowed to connect to the + description: + Array of IP addresses that are allowed to connect to the API as a user of this role. type: array items: @@ -67,7 +68,7 @@ post: example: Interns type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -75,10 +76,10 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Role' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Role" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Roles \ No newline at end of file + - Roles diff --git a/packages/spec/specs/paths/scim/group.yaml b/packages/spec/specs/paths/scim/group.yaml index 379454e940..238a8cafbc 100644 --- a/packages/spec/specs/paths/scim/group.yaml +++ b/packages/spec/specs/paths/scim/group.yaml @@ -2,18 +2,18 @@ get: description: Retrieve a single SCIM Group by unique identifier. operationId: getSCIMGroup responses: - '200': + "200": description: Successful request content: application/json: schema: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM + - SCIM patch: description: Update an existing SCIM Group operationId: updateSCIMGroup @@ -23,29 +23,29 @@ patch: schema: type: object responses: - '200': + "200": content: application/json: schema: type: object description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM + - SCIM delete: description: Delete an existing SCIM Group operationId: deleteSCIMGroup responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM + - SCIM parameters: - - $ref: '../../openapi.yaml#/components/parameters/Id' \ No newline at end of file + - $ref: "#/components/parameters/Id" diff --git a/packages/spec/specs/paths/scim/groups.yaml b/packages/spec/specs/paths/scim/groups.yaml index 412c33e0f0..721a8f76d8 100644 --- a/packages/spec/specs/paths/scim/groups.yaml +++ b/packages/spec/specs/paths/scim/groups.yaml @@ -2,39 +2,40 @@ get: description: List the SCIM Groups. operationId: getSCIMGroups parameters: - - description: The 1-based index of the first result in the current set of list results. - in: query - name: startIndex - required: false - schema: - type: integer - - description: Specifies the desired maximum number of query results per page. - in: query - name: count - required: false - schema: - type: integer - - description: Filter by `id`, `userName`, `emails.value` and `externalId` attributes - are supported. Only the `eq` operator is supported. Uses format `?filter=id eq - 15` - in: query - name: filter - required: false - schema: - type: integer + - description: The 1-based index of the first result in the current set of list results. + in: query + name: startIndex + required: false + schema: + type: integer + - description: Specifies the desired maximum number of query results per page. + in: query + name: count + required: false + schema: + type: integer + - description: + Filter by `id`, `userName`, `emails.value` and `externalId` attributes + are supported. Only the `eq` operator is supported. Uses format `?filter=id eq + 15` + in: query + name: filter + required: false + schema: + type: integer responses: - '200': + "200": description: Successful request content: application/json: schema: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM + - SCIM post: description: Create a new SCIM Group. operationId: createSCIMGroup @@ -44,15 +45,15 @@ post: schema: type: object responses: - '200': + "200": description: Successful request content: application/json: schema: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM \ No newline at end of file + - SCIM diff --git a/packages/spec/specs/paths/scim/user.yaml b/packages/spec/specs/paths/scim/user.yaml index 3934a31219..c3d526d168 100644 --- a/packages/spec/specs/paths/scim/user.yaml +++ b/packages/spec/specs/paths/scim/user.yaml @@ -2,7 +2,8 @@ get: description: Retrieve a single SCIM user by unique identifier. operationId: getSCIMUser parameters: - - description: The `external_id` saved in `directus_users`. Corresponds to the `id` + - description: + The `external_id` saved in `directus_users`. Corresponds to the `id` in the SCIM Users endpoint result. in: path name: id @@ -10,64 +11,66 @@ get: schema: type: integer responses: - '200': + "200": description: Successful request content: application/json: schema: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM + - SCIM patch: description: Update an existing SCIM User operationId: updateSCIMUser parameters: - - description: The `external_id` saved in `directus_users`. Corresponds to the `id` - in the SCIM Users endpoint result. - in: path - name: id - required: true - schema: - type: integer + - description: + The `external_id` saved in `directus_users`. Corresponds to the `id` + in the SCIM Users endpoint result. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: type: object responses: - '200': + "200": content: application/json: schema: type: object description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM + - SCIM delete: description: Delete an existing SCIM User operationId: deleteSCIMUser parameters: - - description: The `external_id` saved in `directus_users`. Corresponds to the `id` - in the SCIM Users endpoint result. - in: path - name: id - required: true - schema: - type: integer + - description: + The `external_id` saved in `directus_users`. Corresponds to the `id` + in the SCIM Users endpoint result. + in: path + name: id + required: true + schema: + type: integer responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM \ No newline at end of file + - SCIM diff --git a/packages/spec/specs/paths/scim/users.yaml b/packages/spec/specs/paths/scim/users.yaml index b6e2a8c07e..9fb6b42afc 100644 --- a/packages/spec/specs/paths/scim/users.yaml +++ b/packages/spec/specs/paths/scim/users.yaml @@ -14,8 +14,9 @@ get: required: false schema: type: integer - - description: Filter by `id`, `userName`, `emails.value` and `externalId` attributes - are supported. Only the `eq` operator is supported. Uses format `?filter=id eq + - description: + Filter by `id`, `userName`, `emails.value` and `externalId` attributes + are supported. Only the `eq` operator is supported. Uses format `?filter=id eq 15` in: query name: filter @@ -23,18 +24,18 @@ get: schema: type: integer responses: - '200': + "200": description: Successful request content: application/json: schema: type: object - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM + - SCIM post: description: Create a new SCIM User. operationId: createSCIMUser @@ -44,15 +45,15 @@ post: schema: type: object responses: - '200': + "200": content: application/json: schema: type: object description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - SCIM \ No newline at end of file + - SCIM diff --git a/packages/spec/specs/paths/server/info.yaml b/packages/spec/specs/paths/server/info.yaml index 42e7ecc755..8d7ddbe295 100644 --- a/packages/spec/specs/paths/server/info.yaml +++ b/packages/spec/specs/paths/server/info.yaml @@ -2,14 +2,14 @@ get: description: Perform a system status check and return the options. operationId: serverInfo parameters: - - description: The first time you create a project, the provided token will be saved and required for subsequent project installs. It can also be found and configured in `/config/__api.json` on your server. - in: query - name: super_admin_token - required: true - schema: - type: integer + - description: The first time you create a project, the provided token will be saved and required for subsequent project installs. It can also be found and configured in `/config/__api.json` on your server. + in: query + name: super_admin_token + required: true + schema: + type: integer responses: - '200': + "200": content: application/json: schema: @@ -18,9 +18,9 @@ get: type: object type: object description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Server \ No newline at end of file + - Server diff --git a/packages/spec/specs/paths/settings/setting.yaml b/packages/spec/specs/paths/settings/setting.yaml index 869c5f8231..32a4a477a1 100644 --- a/packages/spec/specs/paths/settings/setting.yaml +++ b/packages/spec/specs/paths/settings/setting.yaml @@ -2,9 +2,9 @@ get: description: Retrieve a single setting by unique identifier. operationId: getSetting parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -12,18 +12,18 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Setting' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Setting" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Settings + - Settings patch: description: Update an existing setting operationId: updateSetting parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: @@ -37,7 +37,7 @@ patch: type: string type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -45,24 +45,24 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Setting' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Setting" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Settings + - Settings delete: description: Delete an existing setting operationId: deleteSetting responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Settings + - Settings parameters: - - $ref: '../../openapi.yaml#/components/parameters/Id' \ No newline at end of file + - $ref: "#/components/parameters/Id" diff --git a/packages/spec/specs/paths/settings/settings.yaml b/packages/spec/specs/paths/settings/settings.yaml index cca6921656..2a7a9a06f7 100644 --- a/packages/spec/specs/paths/settings/settings.yaml +++ b/packages/spec/specs/paths/settings/settings.yaml @@ -2,13 +2,13 @@ get: description: List the settings. operationId: getSettings parameters: - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Meta' - - $ref: '../../openapi.yaml#/components/parameters/Page' + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Meta" + - $ref: "#/components/parameters/Page" responses: - '200': + "200": description: Successful request content: application/json: @@ -16,13 +16,13 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Setting' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Setting" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Settings + - Settings patch: description: Update an existing setting operationId: updateSetting @@ -32,7 +32,7 @@ patch: schema: type: object responses: - '200': + "200": description: Successful request content: application/json: @@ -40,18 +40,18 @@ patch: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Setting' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Setting" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Settings + - Settings # post: # description: Create a new setting. # operationId: createSettings # parameters: -# - $ref: '../../openapi.yaml#/components/parameters/Meta' +# - $ref: '#/components/parameters/Meta' # requestBody: # content: # application/json: @@ -66,10 +66,10 @@ patch: # type: object # properties: # data: -# $ref: '../../openapi.yaml#/components/schemas/Setting' +# $ref: '#/components/schemas/Setting' # '401': -# $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' +# $ref: '#/components/responses/UnauthorizedError' # '404': -# $ref: '../../openapi.yaml#/components/responses/NotFoundError' +# $ref: '#/components/responses/NotFoundError' # tags: -# - Settings \ No newline at end of file +# - Settings diff --git a/packages/spec/specs/paths/users/me.yaml b/packages/spec/specs/paths/users/me.yaml index 140cfb1d83..d6fd337468 100644 --- a/packages/spec/specs/paths/users/me.yaml +++ b/packages/spec/specs/paths/users/me.yaml @@ -2,10 +2,10 @@ get: description: Retrieve the currently authenticated user. operationId: me parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -13,10 +13,10 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/User' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/User" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users \ No newline at end of file + - Users diff --git a/packages/spec/specs/paths/users/user-invite-token.yaml b/packages/spec/specs/paths/users/user-invite-token.yaml index 29bbb675de..1ddde96d3c 100644 --- a/packages/spec/specs/paths/users/user-invite-token.yaml +++ b/packages/spec/specs/paths/users/user-invite-token.yaml @@ -9,7 +9,7 @@ post: schema: type: integer responses: - '200': + "200": description: Successful request content: application/json: @@ -17,10 +17,10 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/User' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/User" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users \ No newline at end of file + - Users diff --git a/packages/spec/specs/paths/users/user-invite.yaml b/packages/spec/specs/paths/users/user-invite.yaml index 3d93f7e5f8..a395a60db6 100644 --- a/packages/spec/specs/paths/users/user-invite.yaml +++ b/packages/spec/specs/paths/users/user-invite.yaml @@ -1,5 +1,6 @@ post: - description: Invites one or more users to this project. It creates a user with an + description: + Invites one or more users to this project. It creates a user with an invited status, and then sends an email to the user with instructions on how to activate their account. operationId: invite @@ -13,7 +14,7 @@ post: description: Email address or array of email addresses of the to-be-invited user(s). type: string responses: - '200': + "200": description: Successful request content: application/json: @@ -21,10 +22,10 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/User' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/User" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users \ No newline at end of file + - Users diff --git a/packages/spec/specs/paths/users/user-tracking.yaml b/packages/spec/specs/paths/users/user-tracking.yaml index b96fb51fae..9bcdfc343f 100644 --- a/packages/spec/specs/paths/users/user-tracking.yaml +++ b/packages/spec/specs/paths/users/user-tracking.yaml @@ -1,9 +1,10 @@ patch: - description: Updates the last used page field of the user. This is used internally + description: + Updates the last used page field of the user. This is used internally to be able to open the Directus admin app from the last page you used. operationId: updateLastUsedPage parameters: - - $ref: '../../openapi.yaml#/components/parameters/UUId' + - $ref: "#/components/parameters/UUId" requestBody: content: application/json: @@ -14,11 +15,11 @@ patch: type: string type: object responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users \ No newline at end of file + - Users diff --git a/packages/spec/specs/paths/users/user.yaml b/packages/spec/specs/paths/users/user.yaml index d6d4a85c82..62e2aabd06 100644 --- a/packages/spec/specs/paths/users/user.yaml +++ b/packages/spec/specs/paths/users/user.yaml @@ -2,10 +2,10 @@ get: description: Retrieve a single user by unique identifier. operationId: getUser parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" responses: - '200': + "200": description: Successful request content: application/json: @@ -13,26 +13,26 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/User' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/User" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users + - Users patch: description: Update an existing user operationId: updateUser parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: schema: - $ref: '../../openapi.yaml#/components/schemas/User' + $ref: "#/components/schemas/User" responses: - '200': + "200": content: application/json: schema: @@ -41,23 +41,23 @@ patch: type: object type: object description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users + - Users delete: description: Delete an existing user operationId: deleteUser responses: - '200': + "200": description: Successful request - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users + - Users parameters: - - $ref: '../../openapi.yaml#/components/parameters/UUId' \ No newline at end of file + - $ref: "#/components/parameters/UUId" diff --git a/packages/spec/specs/paths/users/users.yaml b/packages/spec/specs/paths/users/users.yaml index 5a3a1ce0be..67ba2f0b45 100644 --- a/packages/spec/specs/paths/users/users.yaml +++ b/packages/spec/specs/paths/users/users.yaml @@ -2,16 +2,16 @@ get: description: List the users. operationId: getUsers parameters: - - $ref: '../../openapi.yaml#/components/parameters/Fields' - - $ref: '../../openapi.yaml#/components/parameters/Limit' - - $ref: '../../openapi.yaml#/components/parameters/Offset' - - $ref: '../../openapi.yaml#/components/parameters/Single' - - $ref: '../../openapi.yaml#/components/parameters/Meta' - - $ref: '../../openapi.yaml#/components/parameters/Sort' - - $ref: '../../openapi.yaml#/components/parameters/Filter' - - $ref: '../../openapi.yaml#/components/parameters/q' + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Single" + - $ref: "#/components/parameters/Meta" + - $ref: "#/components/parameters/Sort" + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/q" responses: - '200': + "200": description: Successful request content: application/json: @@ -21,25 +21,25 @@ get: data: type: array items: - $ref: '../../openapi.yaml#/components/schemas/User' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/User" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users + - Users post: description: Create a new user. operationId: createUser parameters: - - $ref: '../../openapi.yaml#/components/parameters/Meta' + - $ref: "#/components/parameters/Meta" requestBody: content: application/json: schema: - $ref: '../../openapi.yaml#/components/schemas/User' + $ref: "#/components/schemas/User" responses: - '200': + "200": description: Successful request content: application/json: @@ -47,10 +47,10 @@ post: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/User' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/User" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Users \ No newline at end of file + - Users diff --git a/packages/spec/specs/paths/webhooks/webhooks.yaml b/packages/spec/specs/paths/webhooks/webhooks.yaml index 8a73d71f19..f91be68256 100644 --- a/packages/spec/specs/paths/webhooks/webhooks.yaml +++ b/packages/spec/specs/paths/webhooks/webhooks.yaml @@ -2,7 +2,7 @@ get: description: Get all webhooks. operationId: getWebhooks responses: - '200': + "200": description: Successful request content: application/json: @@ -10,10 +10,10 @@ get: type: object properties: data: - $ref: '../../openapi.yaml#/components/schemas/Webhook' - '401': - $ref: '../../openapi.yaml#/components/responses/UnauthorizedError' - '404': - $ref: '../../openapi.yaml#/components/responses/NotFoundError' + $ref: "#/components/schemas/Webhook" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" tags: - - Webhooks \ No newline at end of file + - Webhooks From 882406df31216bbe4a669652b1ac832b726e82a8 Mon Sep 17 00:00:00 2001 From: Thulio Prado Date: Mon, 21 Sep 2020 19:34:48 -0300 Subject: [PATCH 02/41] user and role --- packages/spec/specs/components/role.yaml | 58 ++++++++++--------- packages/spec/specs/components/user.yaml | 71 +++++++++++++----------- 2 files changed, 72 insertions(+), 57 deletions(-) diff --git a/packages/spec/specs/components/role.yaml b/packages/spec/specs/components/role.yaml index 2fa154c67e..035618125a 100644 --- a/packages/spec/specs/components/role.yaml +++ b/packages/spec/specs/components/role.yaml @@ -1,43 +1,51 @@ type: object properties: - collection_listing: - description: Custom override for the admin app collection navigation. - example: null - type: object - nullable: true + id: + description: Unique identifier for the role. + example: 2f24211d-d928-469a-aea3-3c8f53d4e426 + type: string + name: + description: Name of the role. + example: Administrator + type: string + icon: + description: The role's icon. + example: verified_user + type: string description: description: Description of the role. example: Admins have access to all managed data within the system by default type: string nullable: true - enforce_tfa: - description: Whether or not this role enforces the use of 2FA. - example: false - type: boolean - external_id: - description: ID used with external services in SCIM. - example: null - type: string - nullable: true - id: - description: Unique identifier for the role. - example: 2f24211d-d928-469a-aea3-3c8f53d4e426 - type: string - ip_whitelist: - description: Array of IP addresses that are allowed to connect to the API as a + ip_access: + description: + Array of IP addresses that are allowed to connect to the API as a user of this role. example: [] type: array items: type: string - module_listing: + enforce_tfa: + description: Whether or not this role enforces the use of 2FA. + example: false + type: boolean + module_list: description: Custom override for the admin app module bar navigation. example: null type: array items: type: object nullable: true - name: - description: Name of the role. - example: Administrator - type: string \ No newline at end of file + collection_list: + description: Custom override for the admin app collection navigation. + example: null + type: object + nullable: true + admin_access: + description: Admin role. If true, skips all permission checks. + example: false + type: boolean + app_access: + description: The users in the role are allowed to use the app. + example: true + type: boolean diff --git a/packages/spec/specs/components/user.yaml b/packages/spec/specs/components/user.yaml index d1eb942c50..ba66a6ed51 100644 --- a/packages/spec/specs/components/user.yaml +++ b/packages/spec/specs/components/user.yaml @@ -22,15 +22,25 @@ properties: example: "*********" type: string location: - description: Location of the user. + description: The user's location. example: null type: string nullable: true - tfa_secret: - description: The 2FA secret string that's used to generate one time passwords. + title: + description: The user's title. example: null type: string nullable: true + description: + description: The user's description. + example: null + type: string + nullable: + tags: + description: The user's tags. + example: null + type: array + nullable: true avatar: description: The user's avatar. example: null @@ -40,11 +50,35 @@ properties: - type: string - $ref: "../openapi.yaml#/components/schemas/File" nullable: true - external_id: - description: ID used for SCIM. + timezone: + description: The user's timezone. + example: America/New_York + type: string + language: + description: The user's language used in Directus. + example: en-US + type: string + theme: + description: What theme the user is using. + example: auto + type: string + enum: [light, dark, auto] + tfa_secret: + description: The 2FA secret string that's used to generate one time passwords. example: null type: string nullable: true + status: + description: Status of the user. + example: active + type: string + enum: [active, invited, draft, suspended, deleted] + role: + description: Unique identifier of the role of this user. + example: 2f24211d-d928-469a-aea3-3c8f53d4e426 + oneOf: + - type: string + - $ref: "../openapi.yaml#/components/schemas/Role" last_login: description: When this user logged in last. example: "2020-05-31 14:32:37" @@ -56,30 +90,3 @@ properties: example: /my-project/settings/collections/a type: string nullable: true - language: - description: The user's language used in Directus. - example: en-US - type: string - role: - description: Unique identifier of the role of this user. - example: 2f24211d-d928-469a-aea3-3c8f53d4e426 - type: string - status: - description: Status of the user. - example: active - type: string - enum: [active, invited, draft, suspended, deleted] - theme: - description: What theme the user is using. - example: auto - type: string - enum: [light, dark, auto] - timezone: - description: The user's timezone. - example: America/New_York - type: string - title: - description: The user's title. - example: null - type: string - nullable: true From cef7975d582e9ce8c21ad660899e6f2d885939aa Mon Sep 17 00:00:00 2001 From: Thulio Prado Date: Mon, 28 Sep 2020 19:31:46 -0300 Subject: [PATCH 03/41] field, file, folder, permissions, relation and revision --- packages/spec/specs/components/field.yaml | 252 +++++++++++------- packages/spec/specs/components/file.yaml | 192 ++++++------- packages/spec/specs/components/folder.yaml | 6 +- .../spec/specs/components/permissions.yaml | 20 +- packages/spec/specs/components/relation.yaml | 13 +- packages/spec/specs/components/revision.yaml | 38 ++- 6 files changed, 264 insertions(+), 257 deletions(-) diff --git a/packages/spec/specs/components/field.yaml b/packages/spec/specs/components/field.yaml index 5e93ece2ea..045b860898 100644 --- a/packages/spec/specs/components/field.yaml +++ b/packages/spec/specs/components/field.yaml @@ -1,10 +1,5 @@ type: object properties: - id: - description: Unique identifier for the field in the `directus_fields` collection. - example: 167 - type: integer - nullable: true collection: description: Unique name of the collection this field is in. example: about_us @@ -13,102 +8,161 @@ properties: description: Unique name of the field. Field name is unique within the collection. example: id type: string - auto_increment: - description: If the value in this field is auto incremented. Only applies to integer - type fields. - example: true - type: boolean - datatype: - description: SQL datatype of the column that corresponds to this field. - example: INT - type: string - nullable: true - group: - description: What field group this field is part of. - example: null - type: integer - nullable: true - hidden_browse: - description: If this field should be hidden from the item browse (listing) page. - example: true - type: boolean - hidden_detail: - description: If this field should be hidden from the item detail (edit) page. - example: true - type: boolean - interface: - description: What interface is used in the admin app to edit the value for this - field. - example: primary-key - type: string - nullable: true - length: - description: Length of the field. Will be used in SQL to set the `length` property - of the colummn. - example: '10' - type: string - nullable: true - locked: - description: If the field can be altered by the end user. Directus system fields - have this value set to `true`. - example: true - type: boolean - note: - description: A user provided note for the field. Will be rendered alongside the - interface on the edit page. - example: '' - type: string - nullable: true - options: - description: Options for the interface that's used. This format is based on the - individual interface. - example: null - type: object - nullable: true - primary_key: - description: If this field is the primary key of the collection. - example: true - type: boolean - readonly: - description: Prevents the user from editing the value in the field. - example: false - type: boolean - required: - description: If this field requires a value. - example: true - type: boolean - signed: - description: If the value is signed or not. Only applies to integer type fields. - example: false - type: boolean - sort: - description: Sort order of this field on the edit page of the admin app. - example: 1 - type: integer - nullable: true - translation: - description: 'Key value pair of `: ` that allows the user - to change the displayed name of the field in the admin app.' - example: null - type: object - nullable: true type: description: Directus specific data type. Used to cast values in the API. example: integer type: string - unique: - description: If the value of this field should be unique within the collection. - example: false - type: boolean - validation: - description: User provided regex that will be used in the API to validate incoming - values. It uses the PHP flavor of RegEX. - example: null - type: string + schema: + description: The schema info. + type: object + properties: + name: + description: The name of the field. + example: title + type: string + table: + description: The collection of the field. + example: posts + type: string + type: + description: The type of the field. + example: string + type: string + default_value: + description: The default value of the field. + example: null + type: string + nullable: true + max_length: + description: The max length of the field. + example: null + type: integer + nullable: true + is_nullable: + description: If the field is nullable. + example: false + type: boolean + is_primary_key: + description: If the field is primary key. + example: false + type: boolean + has_auto_increment: + description: If the field has auto increment. + example: false + type: boolean + foreign_key_column: + description: Related column from the foreign key constraint. + example: null + type: string + nullable: true + foreign_key_table: + description: Related table from the foreign key constraint. + example: null + type: string + nullable: true + comment: + description: Comment as saved in the database. + example: null + type: string + nullable: true + schema: + description: Database schema (pg only). + example: public + type: string + foreign_key_schema: + description: Related schema from the foreign key constraint (pg only). + example: null + type: string + nullable: true + meta: + description: The meta info. + type: object nullable: true - width: - description: Width of the field on the edit form. - example: null - type: string - nullable: true - enum: [half, half-left, half-right, full, fill, null] \ No newline at end of file + properties: + id: + description: Unique identifier for the field in the `directus_fields` collection. + example: 3 + type: integer + collection: + description: Unique name of the collection this field is in. + example: posts + type: string + field: + description: Unique name of the field. Field name is unique within the collection. + example: title + type: string + special: + description: Transformation flag for field + example: null + type: array + items: + type: string + nullable: true + interface: + description: + What interface is used in the admin app to edit the value for this + field. + example: primary-key + type: string + nullable: true + options: + description: + Options for the interface that's used. This format is based on the + individual interface. + example: null + type: object + nullable: true + display: + description: What display is used in the admin app to display the value for this field. + example: null + type: string + nullable: true + display_options: + description: Options for the display that's used. This format is based on the individual display. + example: null + type: object + nullable: true + locked: + description: + If the field can be altered by the end user. Directus system fields + have this value set to `true`. + example: true + type: boolean + readonly: + description: Prevents the user from editing the value in the field. + example: false + type: boolean + hidden: + description: If this field should be hidden. + example: true + type: boolean + sort: + description: Sort order of this field on the edit page of the admin app. + example: 1 + type: integer + nullable: true + width: + description: Width of the field on the edit form. + example: null + type: string + nullable: true + enum: [half, half-left, half-right, full, fill, null] + group: + description: What field group this field is part of. + example: null + type: integer + nullable: true + translation: + description: + "Key value pair of `: ` that allows the user + to change the displayed name of the field in the admin app." + example: null + type: object + nullable: true + note: + description: + A user provided note for the field. Will be rendered alongside the + interface on the edit page. + example: "" + type: string + nullable: true diff --git a/packages/spec/specs/components/file.yaml b/packages/spec/specs/components/file.yaml index 7a89306a30..d72b48e7c7 100644 --- a/packages/spec/specs/components/file.yaml +++ b/packages/spec/specs/components/file.yaml @@ -1,60 +1,71 @@ type: object properties: + id: + description: Unique identifier for the file. + example: 8cbb43fe-4cdf-4991-8352-c461779cec02 + type: string + storage: + description: + Where the file is stored. Either `local` for the local filesystem + or the name of the storage adapter (for example `s3`). + example: local + type: string + filename_disk: + description: + Name of the file on disk. By default, Directus uses a random hash + for the filename. + example: a88c3b72-ac58-5436-a4ec-b2858531333a.jpg + type: string + filename_download: + description: How you want to the file to be named when it's being downloaded. + example: avatar.jpg + type: string + title: + description: + Title for the file. Is extracted from the filename on upload, but + can be edited by the user. + example: User Avatar + type: string + type: + description: MIME type of the file. + example: image/jpeg + type: string + folder: + description: Virtual folder where this file resides in. + example: null + oneOf: + - type: string + - $ref: "../openapi.yaml#/components/schemas/Folder" + nullable: true + uploaded_by: + description: Who uploaded the file. + example: 63716273-0f29-4648-8a2a-2af2948f6f78 + oneOf: + - type: string + - $ref: "../openapi.yaml#/components/schemas/User" + uploaded_on: + description: When the file was uploaded. + example: "2019-12-03T00:10:15+00:00" + type: string + format: date-time charset: description: Character set of the file. example: binary type: string nullable: true # Should not be null? - checksum: - description: Represents the sum of the correct digits of the file, can be used - to detect errors in and duplicates of the file later. - example: d41d8cd98f00b204e9800998ecf8427e - type: string - data: - example: - embed: null - full_url: 'https://demo.directus.io/uploads/thumper/originals/a88c3b72-ac58-5436-a4ec-b2858531333a.jpg' - thumbnails: - dimension: 64x64 - height: 64 - relative_url: '/thumper/assets/pnw7s9lqy68048g0?key=directus-small-crop' - url: 'https://demo.directus.io/thumper/assets/pnw7s9lqy68048g0?key=directus-small-crop' - width: 64 - url: '/uploads/thumper/originals/a88c3b72-ac58-5436-a4ec-b2858531333a.jpg' - properties: - full_url: - description: Full URL to the original file. - type: string - thumbnails: - description: List of all available asset sizes with links. - type: array - nullable: true - items: - type: object - properties: - dimension: - description: Width x height of the thumbnail. - type: string - height: - description: Height of the thumbnail in pixels. - type: integer - relative_url: - description: Relative URL to the thumbnail. - type: string - url: - description: Full URL to the thumbnail. - type: string - width: - description: Width of the thumbnail in pixels. - type: integer - url: - description: Relative URL to the original file. - type: string - type: object - description: - description: Description for the file. - example: '' - type: string + filesize: + description: Size of the file in bytes. + example: 137862 + type: integer + width: + description: Width of the file in pixels. Only applies to images. + example: 800 + type: integer + nullable: true + height: + description: Height of the file in pixels. Only applies to images. + example: 838 + type: integer nullable: true duration: description: Duration of the file in seconds. Only applies to audio and video. @@ -66,82 +77,29 @@ properties: example: null type: string nullable: true - filename_disk: - description: Name of the file on disk. By default, Directus uses a random hash - for the filename. - example: a88c3b72-ac58-5436-a4ec-b2858531333a.jpg + description: + description: Description for the file. + example: "" type: string - filename_download: - description: How you want to the file to be named when it's being downloaded. - example: avatar.jpg - type: string - filesize: - description: Size of the file in bytes. - example: 137862 - type: integer - folder: - description: Virtual folder where this file resides in. - example: null - $ref: '../openapi.yaml#/components/schemas/Folder' nullable: true - height: - description: Height of the file in pixels. Only applies to images. - example: 838 - type: integer - nullable: true - id: - description: Unique identifier for the file. - example: 8cbb43fe-4cdf-4991-8352-c461779cec02 - type: string location: - description: Where the file was created. Is automatically populated based on EXIF + description: + Where the file was created. Is automatically populated based on EXIF data for images. type: string nullable: true - metadata: - description: User provided miscellaneous key value pairs that serve as additional - metadata for the file. - example: null - type: object - nullable: true - private_hash: - description: Random hash used to access the file privately. This can be rotated - to prevent unauthorized access to the file. - example: pnw7s9lqy68048g0 - type: string - storage: - description: Where the file is stored. Either `local` for the local filesystem - or the name of the storage adapter (for example `s3`). - example: local - type: string tags: - description: Tags for the file. Is automatically populated based on EXIF data + description: + Tags for the file. Is automatically populated based on EXIF data for images. type: array nullable: true items: type: string - title: - description: Title for the file. Is extracted from the filename on upload, but - can be edited by the user. - example: User Avatar - type: string - type: - description: MIME type of the file. - example: image/jpeg - type: string - uploaded_by: - description: Who uploaded the file. - example: 63716273-0f29-4648-8a2a-2af2948f6f78 - type: string - # $ref: '../openapi.yaml#/components/schemas/User' - uploaded_on: - description: When the file was uploaded. - example: '2019-12-03T00:10:15+00:00' - type: string - format: date-time - width: - description: Width of the file in pixels. Only applies to images. - example: 800 - type: integer - nullable: true \ No newline at end of file + metadata: + description: + User provided miscellaneous key value pairs that serve as additional + metadata for the file. + example: null + type: object + nullable: true diff --git a/packages/spec/specs/components/folder.yaml b/packages/spec/specs/components/folder.yaml index d91471c03f..8151938c8a 100644 --- a/packages/spec/specs/components/folder.yaml +++ b/packages/spec/specs/components/folder.yaml @@ -11,5 +11,7 @@ properties: parent_folder: description: Unique identifier of the parent folder. This allows for nested folders. example: null - type: string - nullable: true \ No newline at end of file + oneOf: + - type: string + - $ref: "../openapi.yaml#/components/schemas/Folder" + nullable: true diff --git a/packages/spec/specs/components/permissions.yaml b/packages/spec/specs/components/permissions.yaml index 1f07a39c0e..18a00fd3ca 100644 --- a/packages/spec/specs/components/permissions.yaml +++ b/packages/spec/specs/components/permissions.yaml @@ -1,5 +1,14 @@ type: object properties: + id: + description: Unique identifier for the permission. + example: 1 + type: integer + role: + description: Unique identifier of the role this permission applies to. + example: 2f24211d-d928-469a-aea3-3c8f53d4e426 + type: string + nullable: true # Should this be nullable? collection: description: What collection this permission applies to. example: customers @@ -24,10 +33,6 @@ properties: example: none type: string enum: [none, create, update, always] - id: - description: Unique identifier for the permission. - example: 1 - type: integer read: description: If the user can read items. example: mine @@ -39,11 +44,6 @@ properties: type: array items: type: string - role: - description: Unique identifier of the role this permission applies to. - example: 2f24211d-d928-469a-aea3-3c8f53d4e426 - type: string - nullable: true # Should this be nullable? status: description: What status this permission applies to. example: null @@ -67,4 +67,4 @@ properties: example: [] type: array items: - type: string \ No newline at end of file + type: string diff --git a/packages/spec/specs/components/relation.yaml b/packages/spec/specs/components/relation.yaml index f3bab48044..270828fe89 100644 --- a/packages/spec/specs/components/relation.yaml +++ b/packages/spec/specs/components/relation.yaml @@ -1,5 +1,9 @@ type: object properties: + id: + description: Unique identifier for the relation. + example: 1 + type: integer many_collection: description: Collection that has the field that holds the foreign key. example: directus_activity @@ -25,13 +29,10 @@ properties: description: The primary field. example: id type: string - id: - description: Unique identifier for the relation. - example: 1 - type: integer junction_field: - description: Field on the junction table that holds the primary key of the related + description: + Field on the junction table that holds the primary key of the related collection. example: null type: string - nullable: true \ No newline at end of file + nullable: true diff --git a/packages/spec/specs/components/revision.yaml b/packages/spec/specs/components/revision.yaml index 33acaef79b..921d8b388a 100644 --- a/packages/spec/specs/components/revision.yaml +++ b/packages/spec/specs/components/revision.yaml @@ -1,20 +1,30 @@ type: object properties: + id: + description: Unique identifier for the revision. + example: 1 + type: integer activity: description: Unique identifier for the [activity](/api/activity) record. example: 2 - type: integer + oneOf: + - type: integer + - $ref: "../openapi.yaml#/components/schemas/Activity" collection: description: Collection of the updated item. example: articles type: string + item: + description: Primary key of updated item. + example: "168" + type: string data: description: Copy of item state at time of update. example: author: 1 body: This is my first post featured_image: 15 - id: '168' + id: "168" title: Hello, World! type: object nullable: true # Should this be nullable? @@ -24,28 +34,10 @@ properties: title: Hello, World! oneOf: - type: object - id: - description: Unique identifier for the revision. - example: 1 - type: integer - item: - description: Primary key of updated item. - example: '168' - type: string - parent_changed: - description: If the current item was updated relationally, this shows if the parent - item was updated as well. - example: false - type: boolean - parent_collection: - description: If the current item was updated relationally, this is the collection + parent: + description: + If the current item was updated relationally, this is the collection of the parent item. example: null type: string nullable: true - parent_item: - description: If the current item was updated relationally, this is the unique - identifier of the parent item. - example: null - type: string - nullable: true \ No newline at end of file From 1a817c1a93dbfefa63a7f2f074366c364a47b18b Mon Sep 17 00:00:00 2001 From: Thulio Prado Date: Tue, 29 Sep 2020 18:29:14 -0300 Subject: [PATCH 04/41] collections, presets, settings, webhooks --- .../spec/specs/components/collection.yaml | 63 +++++++++-- packages/spec/specs/components/item.yaml | 2 +- packages/spec/specs/components/preset.yaml | 103 +++++++++--------- packages/spec/specs/components/setting.yaml | 61 ++++++++++- packages/spec/specs/components/webhook.yaml | 31 +++++- 5 files changed, 194 insertions(+), 66 deletions(-) diff --git a/packages/spec/specs/components/collection.yaml b/packages/spec/specs/components/collection.yaml index f5e486dbfc..505615688b 100644 --- a/packages/spec/specs/components/collection.yaml +++ b/packages/spec/specs/components/collection.yaml @@ -11,33 +11,74 @@ properties: properties: collection: description: The collection name again! + example: customers type: string - hidden: - type: boolean - singleton: - type: boolean icon: + description: Name of a Google Material Design Icon that's assigned to this collection. type: string + example: people nullable: true note: + description: A note describing the collection. type: string - nullable: true - translation: - type: string + example: null nullable: true display_template: + description: type: string + example: null + nullable: true + hidden: + description: Whether or not the collection is hidden from the navigation in the admin app. + type: boolean + example: false + singleton: + description: Whether or not the collection is treated as a single object. + type: boolean + example: false + translation: + description: Key value pairs of how to show this collection's name in different languages in the admin app. + type: string + example: null + nullable: true + archive_field: + description: What field holds the archive value. + type: string + example: null + nullable: true + archive_app_filter: + description: What value to use for "archived" items. + type: string + example: null + nullable: true + archive_value: + description: What value to use to "unarchive" items. + type: string + example: null + nullable: true + unarchive_value: + description: Whether or not to show the "archived" filter. + type: string + example: null + nullable: true + sort_field: + description: The sort field in the collection. + type: string + example: null nullable: true schema: type: object properties: name: + description: The collection name again! type: string + example: customers schema: + description: Database schema (pg only). + example: public type: string comment: + description: Comment as saved in the database. type: string - collation: - type: string - engine: - type: string + example: null + nullable: true diff --git a/packages/spec/specs/components/item.yaml b/packages/spec/specs/components/item.yaml index 4ee2fb1f9d..03b0d8bfea 100644 --- a/packages/spec/specs/components/item.yaml +++ b/packages/spec/specs/components/item.yaml @@ -1,2 +1,2 @@ type: object -properties: {} \ No newline at end of file +properties: {} diff --git a/packages/spec/specs/components/preset.yaml b/packages/spec/specs/components/preset.yaml index 5c59944b48..af722a18cb 100644 --- a/packages/spec/specs/components/preset.yaml +++ b/packages/spec/specs/components/preset.yaml @@ -1,12 +1,46 @@ type: object properties: + id: + description: Unique identifier for this single collection preset. + example: 155 + type: integer + bookmark: + description: + Name for the bookmark. If this is set, the collection preset will + be considered to be a bookmark. + example: null + nullable: true + type: string + user: + description: + The unique identifier of the user to whom this collection preset + applies. + example: 63716273-0f29-4648-8a2a-2af2948f6f78 + nullable: true + oneOf: + - type: string + - $ref: "../openapi.yaml#/components/schemas/User" + role: + description: + The unique identifier of a role in the platform. If `user` is null, + this will be used to apply the collection preset or bookmark for all users in + the role. + example: 50419801-0f30-8644-2b3c-9bc2d980d0a0 + nullable: true + type: string collection: description: What collection this collection preset is used for. example: articles type: string + search: + description: What the user searched for in search/filter in the header bar. + example: null + type: string + nullable: true filters: description: The filters that the user applied. example: + key: 7RwVrquB5dPmfbrI1rcWy field: title operator: contains value: Hello @@ -14,60 +48,27 @@ properties: nullable: true items: type: object - id: - description: Unique identifier for this single collection preset. - example: '155' - type: integer - role: - description: The unique identifier of a role in the platform. If `user` is null, - this will be used to apply the collection preset or bookmark for all users in - the role. - example: 63716273-0f29-4648-8a2a-2af2948f6f78 - nullable: true + layout: + description: Name of the layout type that is used. type: string - search_query: - description: What the user searched for in search/filter in the header bar. example: null - type: string - nullable: true - title: - description: Name for the bookmark. If this is set, the collection preset will - be considered to be a bookmark. - example: null - type: string - nullable: true - translation: - description: Key value pair of language-translation. Can be used to translate - the bookmark title in multiple languages. - example: null - type: object - nullable: true - user: - description: The unique identifier of the user to whom this collection preset - applies. - example: 63716273-0f29-4648-8a2a-2af2948f6f78 - nullable: true - type: string - view_options: - description: Options of the views. The properties in here are controlled by the - layout. - example: - timeline: - color: action - content: excerpt - date: published_on - title: '{{ title }} ({{ author.first_name }} {{ author.last_name }})' - type: object - nullable: true - view_query: - description: View query that's saved per view type. Controls what data is fetched + layout_query: + description: + Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. example: - timeline: + cards: sort: -published_on - type: object + filters: [published_on, published_by] + nullable: true + layout_options: + description: + Options of the views. The properties in here are controlled by the + layout. + example: + cards: + icon: account_circle + title: "{{ first_name }} {{ last_name }}" + subtitle: "{{ title }}" + size: 3 nullable: true - view_type: - description: Name of the view type that is used. - example: timeline - type: string \ No newline at end of file diff --git a/packages/spec/specs/components/setting.yaml b/packages/spec/specs/components/setting.yaml index 4171ab656f..f4ab6e0f6c 100644 --- a/packages/spec/specs/components/setting.yaml +++ b/packages/spec/specs/components/setting.yaml @@ -2,6 +2,63 @@ type: object properties: id: description: Unique identifier for the setting. - example: 1 type: integer -additionalProperties: true \ No newline at end of file + example: 1 + project_name: + description: The name of the project. + type: string + example: Directus + project_url: + description: The url of the project. + type: string + example: null + nullable: true + project_color: + description: The color of the project. + type: string + example: null + nullable: true + project_logo: + description: The logo of the project. + type: string + example: null + nullable: true + public_foreground: + description: The foreground of the project. + type: string + example: null + nullable: true + public_background: + description: The background of the project. + type: string + example: null + nullable: true + public_note: + description: The notes of the project. + type: string + example: null + nullable: true + auth_idle_timeout: + description: Idle authentication timeout. + type: integer + example: 10080 + auth_login_attempts: + description: Authentication login attempts. + type: integer + example: 25, + auth_password_policy: + description: Authentication password policy. + type: string + example: null + nullable: true + storage_asset_transform: + description: + type: string + example: "all" + nullable: true + storage_asset_presets: + description: + type: string + example: null + nullable: true +additionalProperties: true diff --git a/packages/spec/specs/components/webhook.yaml b/packages/spec/specs/components/webhook.yaml index c2d3f4ea36..f616d5bfbc 100644 --- a/packages/spec/specs/components/webhook.yaml +++ b/packages/spec/specs/components/webhook.yaml @@ -3,4 +3,33 @@ properties: id: description: The index of the webhook. type: integer - example: 1 \ No newline at end of file + example: 1 + name: + description: The name of the webhook. + type: string + example: create articles + method: + description: Method used in the webhook. + type: string + example: POST + url: + description: The url of the webhook. + type: string + example: null + nullable: true + status: + description: The status of the webhook. + type: boolean + example: inactive + data: + description: If yes, send the content of what was done + type: boolean + example: true + actions: + description: The actions that triggers this webhook. + example: null + nullable: true + collections: + description: The collections that triggers this webhook. + example: null + nullable: true From 1cf8bde981b19eda4d91304085fe55a1ffa7bdcc Mon Sep 17 00:00:00 2001 From: Thulio Prado Date: Tue, 29 Sep 2020 19:00:51 -0300 Subject: [PATCH 05/41] changes --- packages/spec/specs/components/collection.yaml | 1 + packages/spec/specs/components/permissions.yaml | 9 ++++----- packages/spec/specs/components/revision.yaml | 3 +-- packages/spec/specs/components/user.yaml | 1 - 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/spec/specs/components/collection.yaml b/packages/spec/specs/components/collection.yaml index 505615688b..e6a9322f03 100644 --- a/packages/spec/specs/components/collection.yaml +++ b/packages/spec/specs/components/collection.yaml @@ -7,6 +7,7 @@ properties: meta: description: Metadata of the collection. type: object + example: null nullable: true properties: collection: diff --git a/packages/spec/specs/components/permissions.yaml b/packages/spec/specs/components/permissions.yaml index 18a00fd3ca..4d7463a4aa 100644 --- a/packages/spec/specs/components/permissions.yaml +++ b/packages/spec/specs/components/permissions.yaml @@ -52,11 +52,10 @@ properties: status_blacklist: description: Explicitly denies specific statuses to be used. example: [] - oneOf: - - type: array - nullable: true - items: - type: string + type: array + nullable: true + items: + type: string update: description: If the user can update items. example: none diff --git a/packages/spec/specs/components/revision.yaml b/packages/spec/specs/components/revision.yaml index 921d8b388a..5e1cbd2074 100644 --- a/packages/spec/specs/components/revision.yaml +++ b/packages/spec/specs/components/revision.yaml @@ -32,8 +32,7 @@ properties: description: Changes between the previous and the current revision. example: title: Hello, World! - oneOf: - - type: object + type: object parent: description: If the current item was updated relationally, this is the collection diff --git a/packages/spec/specs/components/user.yaml b/packages/spec/specs/components/user.yaml index ba66a6ed51..e99d1f25ca 100644 --- a/packages/spec/specs/components/user.yaml +++ b/packages/spec/specs/components/user.yaml @@ -46,7 +46,6 @@ properties: example: null oneOf: - type: integer - nullable: true - type: string - $ref: "../openapi.yaml#/components/schemas/File" nullable: true From 8c60dc41dd57f591cdcf9a01908cc697ad54119f Mon Sep 17 00:00:00 2001 From: Thulio Prado Date: Tue, 29 Sep 2020 19:39:41 -0300 Subject: [PATCH 06/41] some fixes and changes --- packages/spec/specs/components/activity.yaml | 4 +++- packages/spec/specs/components/collection.yaml | 2 +- packages/spec/specs/components/setting.yaml | 4 ++-- packages/spec/specs/components/user.yaml | 4 +++- packages/spec/specs/paths/assets/assets.yaml | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/spec/specs/components/activity.yaml b/packages/spec/specs/components/activity.yaml index 0b61752148..43f6c659e2 100644 --- a/packages/spec/specs/components/activity.yaml +++ b/packages/spec/specs/components/activity.yaml @@ -21,8 +21,10 @@ properties: invalid-credentials, ] action_by: - $ref: "./user.yaml" description: The user who caused this action. + oneOf: + - type: string + - $ref: "../openapi.yaml#/components/schemas/User" nullable: true # States the SQL structure action_on: description: When the action happened. diff --git a/packages/spec/specs/components/collection.yaml b/packages/spec/specs/components/collection.yaml index e6a9322f03..23f04f168a 100644 --- a/packages/spec/specs/components/collection.yaml +++ b/packages/spec/specs/components/collection.yaml @@ -25,7 +25,7 @@ properties: example: null nullable: true display_template: - description: + description: Text representation of how items from this collection are shown across the system. type: string example: null nullable: true diff --git a/packages/spec/specs/components/setting.yaml b/packages/spec/specs/components/setting.yaml index f4ab6e0f6c..595e3a018d 100644 --- a/packages/spec/specs/components/setting.yaml +++ b/packages/spec/specs/components/setting.yaml @@ -52,12 +52,12 @@ properties: example: null nullable: true storage_asset_transform: - description: + description: "" type: string example: "all" nullable: true storage_asset_presets: - description: + description: "" type: string example: null nullable: true diff --git a/packages/spec/specs/components/user.yaml b/packages/spec/specs/components/user.yaml index e99d1f25ca..fdb2ca4876 100644 --- a/packages/spec/specs/components/user.yaml +++ b/packages/spec/specs/components/user.yaml @@ -35,12 +35,14 @@ properties: description: The user's description. example: null type: string - nullable: + nullable: true tags: description: The user's tags. example: null type: array nullable: true + items: + type: string avatar: description: The user's avatar. example: null diff --git a/packages/spec/specs/paths/assets/assets.yaml b/packages/spec/specs/paths/assets/assets.yaml index b344658c15..e3eae083c1 100644 --- a/packages/spec/specs/paths/assets/assets.yaml +++ b/packages/spec/specs/paths/assets/assets.yaml @@ -6,9 +6,9 @@ get: security: - Auth: [] parameters: - - name: key + - name: id in: path - description: private_hash of the file + description: The id of the file. required: true schema: type: string From 96fa38f12c42cf417b9fb77dffc28e21486bb366 Mon Sep 17 00:00:00 2001 From: Thulio Prado Date: Wed, 30 Sep 2020 18:45:40 -0300 Subject: [PATCH 07/41] updates api specs --- packages/spec/specs/openapi.yaml | 21 ++--- packages/spec/specs/parameters/id.yaml | 4 +- packages/spec/specs/paths/auth/login.yaml | 7 +- packages/spec/specs/paths/auth/logout.yaml | 15 +++- .../specs/paths/auth/password-request.yaml | 4 - packages/spec/specs/paths/auth/refresh.yaml | 3 + .../spec/specs/paths/presets/presets.yaml | 21 ++--- packages/spec/specs/paths/scim/group.yaml | 51 ------------- packages/spec/specs/paths/scim/groups.yaml | 59 -------------- packages/spec/specs/paths/scim/user.yaml | 76 ------------------- packages/spec/specs/paths/scim/users.yaml | 59 -------------- 11 files changed, 40 insertions(+), 280 deletions(-) delete mode 100644 packages/spec/specs/paths/scim/group.yaml delete mode 100644 packages/spec/specs/paths/scim/groups.yaml delete mode 100644 packages/spec/specs/paths/scim/user.yaml delete mode 100644 packages/spec/specs/paths/scim/users.yaml diff --git a/packages/spec/specs/openapi.yaml b/packages/spec/specs/openapi.yaml index 5c0597253b..f56f5f7f03 100644 --- a/packages/spec/specs/openapi.yaml +++ b/packages/spec/specs/openapi.yaml @@ -1,17 +1,18 @@ openapi: 3.0.1 info: - title: Directus SDK + title: Directus API description: Template for generating any kind of SDK. contact: email: contact@directus.io license: name: GPL-3.0 url: "https://www.gnu.org/licenses/gpl-3.0.de.html" - version: 1.0.0 + version: 9.0.0 externalDocs: description: Directus Docs url: "https://docs.directus.io" servers: + - url: "http://localhost:41201/" - url: "https://demo.directus.io/" - url: "/" tags: @@ -21,8 +22,8 @@ tags: description: Image typed files can be dynamically resized and transformed to fit any need. - name: Authentication description: All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens. - - name: Collection presets - description: Collection presets hold the preferences of individual users of the platform. This allows Directus to show and maintain custom item listings for users of the app. + - name: Presets + description: Presets hold the preferences of individual users of the platform. This allows Directus to show and maintain custom item listings for users of the app. - name: Collections description: Collections are the individual collections of items, similar to tables in a database. Changes to collections will alter the schema of the database. - name: Extensions @@ -71,7 +72,7 @@ paths: $ref: "./paths/activity/activity-comment.yaml" # Assets - /assets/{key}: + /assets/{id}: $ref: "./paths/assets/assets.yaml" # Authentication @@ -172,16 +173,6 @@ paths: /roles/{id}: $ref: "./paths/roles/role.yaml" - # SCIM - /scim/v2/Users: - $ref: "./paths/scim/users.yaml" - /scim/v2/Users/{id}: - $ref: "./paths/scim/user.yaml" - /scim/v2/Groups: - $ref: "./paths/scim/groups.yaml" - /scim/v2/Groups/{id}: - $ref: "./paths/scim/group.yaml" - # Server /server/info: $ref: "./paths/server/info.yaml" diff --git a/packages/spec/specs/parameters/id.yaml b/packages/spec/specs/parameters/id.yaml index ec7af1c934..ab577d31de 100644 --- a/packages/spec/specs/parameters/id.yaml +++ b/packages/spec/specs/parameters/id.yaml @@ -1,6 +1,6 @@ -description: Index of the file. +description: Index name: id in: path required: true schema: - type: integer \ No newline at end of file + type: integer diff --git a/packages/spec/specs/paths/auth/login.yaml b/packages/spec/specs/paths/auth/login.yaml index 7cdd4c4002..fc3aa301f8 100644 --- a/packages/spec/specs/paths/auth/login.yaml +++ b/packages/spec/specs/paths/auth/login.yaml @@ -21,8 +21,8 @@ post: example: password mode: type: string - enum: [jwt, cookie] - default: jwt + enum: ["json", cookie] + default: "json" description: Choose between retrieving the token as a string, or setting it as a cookie. otp: type: string @@ -44,3 +44,6 @@ post: expires: type: integer example: 900 + refresh_token: + type: string + example: yuOJkjdPXMd... diff --git a/packages/spec/specs/paths/auth/logout.yaml b/packages/spec/specs/paths/auth/logout.yaml index 120471a4f0..2beb4b14eb 100644 --- a/packages/spec/specs/paths/auth/logout.yaml +++ b/packages/spec/specs/paths/auth/logout.yaml @@ -3,6 +3,17 @@ post: tags: - Authentication operationId: logout + requestBody: + content: + application/json: + schema: + type: object + required: [token] + properties: + refresh_token: + type: string + example: eyJ0eXAiOiJKV... + description: JWT access token you want to logout. responses: - '200': - description: Request successful \ No newline at end of file + "200": + description: Request successful diff --git a/packages/spec/specs/paths/auth/password-request.yaml b/packages/spec/specs/paths/auth/password-request.yaml index 71637a4278..fbbceb9b0e 100644 --- a/packages/spec/specs/paths/auth/password-request.yaml +++ b/packages/spec/specs/paths/auth/password-request.yaml @@ -14,10 +14,6 @@ post: type: string example: admin@example.com description: Email address of the user you're requesting a reset for. - reset_url: - type: string - example: https://mydomain.com/passwordreset - description: Provide a custom reset url which the link in the Email will lead to. The reset token will be passed as a parameter. responses: "401": $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/auth/refresh.yaml b/packages/spec/specs/paths/auth/refresh.yaml index 3dcc7becf3..0f417f637c 100644 --- a/packages/spec/specs/paths/auth/refresh.yaml +++ b/packages/spec/specs/paths/auth/refresh.yaml @@ -31,5 +31,8 @@ post: expires: type: integer example: 900 + refresh_token: + type: string + example: Gy-caJMpmGTA... "401": $ref: "#/components/responses/UnauthorizedError" diff --git a/packages/spec/specs/paths/presets/presets.yaml b/packages/spec/specs/paths/presets/presets.yaml index fdb8923b98..5b0970a74c 100644 --- a/packages/spec/specs/paths/presets/presets.yaml +++ b/packages/spec/specs/paths/presets/presets.yaml @@ -53,9 +53,10 @@ post: description: Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark. example: Highly rated articles role: - type: integer + type: string description: The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role. - search_query: + example: null + search: type: string description: What the user searched for in search/filter in the header bar. filters: @@ -63,6 +64,9 @@ post: items: type: object properties: + key: + type: string + example: aHKLAakdVghzD field: type: string example: rating @@ -72,18 +76,15 @@ post: value: type: integer example: 4.5 - view_type: + layout: type: string - description: Name of the view type that is used. Defaults to tabular. - view_query: + description: Name of the view type that is used. + layout_query: type: string - description: View query that's saved per view type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. - view_options: + description: Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. + layout_options: type: string description: Options of the views. The properties in here are controlled by the layout. - translation: - type: object - description: Key value pair of language-translation. Can be used to translate the bookmark title in multiple languages. responses: "200": description: Successful request diff --git a/packages/spec/specs/paths/scim/group.yaml b/packages/spec/specs/paths/scim/group.yaml deleted file mode 100644 index 238a8cafbc..0000000000 --- a/packages/spec/specs/paths/scim/group.yaml +++ /dev/null @@ -1,51 +0,0 @@ -get: - description: Retrieve a single SCIM Group by unique identifier. - operationId: getSCIMGroup - responses: - "200": - description: Successful request - content: - application/json: - schema: - type: object - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM -patch: - description: Update an existing SCIM Group - operationId: updateSCIMGroup - requestBody: - content: - application/json: - schema: - type: object - responses: - "200": - content: - application/json: - schema: - type: object - description: Successful request - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM -delete: - description: Delete an existing SCIM Group - operationId: deleteSCIMGroup - responses: - "200": - description: Successful request - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM -parameters: - - $ref: "#/components/parameters/Id" diff --git a/packages/spec/specs/paths/scim/groups.yaml b/packages/spec/specs/paths/scim/groups.yaml deleted file mode 100644 index 721a8f76d8..0000000000 --- a/packages/spec/specs/paths/scim/groups.yaml +++ /dev/null @@ -1,59 +0,0 @@ -get: - description: List the SCIM Groups. - operationId: getSCIMGroups - parameters: - - description: The 1-based index of the first result in the current set of list results. - in: query - name: startIndex - required: false - schema: - type: integer - - description: Specifies the desired maximum number of query results per page. - in: query - name: count - required: false - schema: - type: integer - - description: - Filter by `id`, `userName`, `emails.value` and `externalId` attributes - are supported. Only the `eq` operator is supported. Uses format `?filter=id eq - 15` - in: query - name: filter - required: false - schema: - type: integer - responses: - "200": - description: Successful request - content: - application/json: - schema: - type: object - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM -post: - description: Create a new SCIM Group. - operationId: createSCIMGroup - requestBody: - content: - application/json: - schema: - type: object - responses: - "200": - description: Successful request - content: - application/json: - schema: - type: object - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM diff --git a/packages/spec/specs/paths/scim/user.yaml b/packages/spec/specs/paths/scim/user.yaml deleted file mode 100644 index c3d526d168..0000000000 --- a/packages/spec/specs/paths/scim/user.yaml +++ /dev/null @@ -1,76 +0,0 @@ -get: - description: Retrieve a single SCIM user by unique identifier. - operationId: getSCIMUser - parameters: - - description: - The `external_id` saved in `directus_users`. Corresponds to the `id` - in the SCIM Users endpoint result. - in: path - name: id - required: true - schema: - type: integer - responses: - "200": - description: Successful request - content: - application/json: - schema: - type: object - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM -patch: - description: Update an existing SCIM User - operationId: updateSCIMUser - parameters: - - description: - The `external_id` saved in `directus_users`. Corresponds to the `id` - in the SCIM Users endpoint result. - in: path - name: id - required: true - schema: - type: integer - requestBody: - content: - application/json: - schema: - type: object - responses: - "200": - content: - application/json: - schema: - type: object - description: Successful request - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM -delete: - description: Delete an existing SCIM User - operationId: deleteSCIMUser - parameters: - - description: - The `external_id` saved in `directus_users`. Corresponds to the `id` - in the SCIM Users endpoint result. - in: path - name: id - required: true - schema: - type: integer - responses: - "200": - description: Successful request - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM diff --git a/packages/spec/specs/paths/scim/users.yaml b/packages/spec/specs/paths/scim/users.yaml deleted file mode 100644 index 9fb6b42afc..0000000000 --- a/packages/spec/specs/paths/scim/users.yaml +++ /dev/null @@ -1,59 +0,0 @@ -get: - description: List the SCIM users - operationId: getSCIMUsers - parameters: - - description: The 1-based index of the first result in the current set of list results. - in: query - name: startIndex - required: false - schema: - type: integer - - description: Specifies the desired maximum number of query results per page. - in: query - name: count - required: false - schema: - type: integer - - description: - Filter by `id`, `userName`, `emails.value` and `externalId` attributes - are supported. Only the `eq` operator is supported. Uses format `?filter=id eq - 15` - in: query - name: filter - required: false - schema: - type: integer - responses: - "200": - description: Successful request - content: - application/json: - schema: - type: object - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM -post: - description: Create a new SCIM User. - operationId: createSCIMUser - requestBody: - content: - application/json: - schema: - type: object - responses: - "200": - content: - application/json: - schema: - type: object - description: Successful request - "401": - $ref: "#/components/responses/UnauthorizedError" - "404": - $ref: "#/components/responses/NotFoundError" - tags: - - SCIM From 508661167e56970ccc297943ea1a1096330b185f Mon Sep 17 00:00:00 2001 From: Nitwel Date: Fri, 2 Oct 2020 20:36:24 +0200 Subject: [PATCH 08/41] add accordion option to v-list-group --- app/src/components/v-list/v-list-group.vue | 16 ++++++++++++---- .../modules/docs/components/navigation-item.vue | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/src/components/v-list/v-list-group.vue b/app/src/components/v-list/v-list-group.vue index bf9f904e21..aa41ab4830 100644 --- a/app/src/components/v-list/v-list-group.vue +++ b/app/src/components/v-list/v-list-group.vue @@ -1,5 +1,5 @@ diff --git a/app/src/modules/docs/components/navigation-item.vue b/app/src/modules/docs/components/navigation-item.vue index 4a2fc16be6..4708d82fb8 100644 --- a/app/src/modules/docs/components/navigation-item.vue +++ b/app/src/modules/docs/components/navigation-item.vue @@ -14,7 +14,7 @@ dense /> - +
From 325fe78791101bb79e9feacba0c075637d2b22c7 Mon Sep 17 00:00:00 2001 From: Nitwel Date: Sat, 3 Oct 2020 00:56:40 +0200 Subject: [PATCH 10/41] Remove v-model on groups and make docs nav linear --- app/src/components/v-list/v-list-group.vue | 17 +------ app/src/components/v-list/v-list.vue | 2 +- .../docs/components/navigation-item.vue | 36 +------------- .../modules/docs/components/navigation.vue | 49 ++++++++++++------- 4 files changed, 35 insertions(+), 69 deletions(-) diff --git a/app/src/components/v-list/v-list-group.vue b/app/src/components/v-list/v-list-group.vue index 52fe1c17de..7569b4caa7 100644 --- a/app/src/components/v-list/v-list-group.vue +++ b/app/src/components/v-list/v-list-group.vue @@ -19,10 +19,6 @@ import { defineComponent, nextTick, toRefs, watch, PropType, ref } from '@vue/co import { useGroupableParent, useGroupable } from '@/composables/groupable'; export default defineComponent({ - model: { - prop: 'activeItems', - event: 'input' - }, props: { multiple: { type: Boolean, @@ -32,10 +28,6 @@ export default defineComponent({ type: String, default: null, }, - activeItems: { - type: Array as PropType<(number | string)[]>, - default: null - }, active: { type: Boolean, default: false, @@ -62,7 +54,7 @@ export default defineComponent({ } }, setup(props, { listeners, emit }) { - const {activeItems, multiple} = toRefs(props) + const {multiple} = toRefs(props) const { active: groupActive, toggle, activate, deactivate } = useGroupable({ group: props.scope, @@ -71,12 +63,7 @@ export default defineComponent({ if (props.disableGroupableParent !== true) { useGroupableParent( - { - selection: activeItems, - onSelectionChange: (newSelection) => { - emit('input', newSelection) - } - }, + {}, { multiple } diff --git a/app/src/components/v-list/v-list.vue b/app/src/components/v-list/v-list.vue index 5d05a33ee6..8aec96c005 100644 --- a/app/src/components/v-list/v-list.vue +++ b/app/src/components/v-list/v-list.vue @@ -54,7 +54,7 @@ export default defineComponent({ } }, { - mandatory: ref(false), + mandatory: ref(true), multiple } ); diff --git a/app/src/modules/docs/components/navigation-item.vue b/app/src/modules/docs/components/navigation-item.vue index 31bf78d834..e9b99f6679 100644 --- a/app/src/modules/docs/components/navigation-item.vue +++ b/app/src/modules/docs/components/navigation-item.vue @@ -1,5 +1,5 @@