From 69ffea9a7218930f77dc62382b017384616d2cce Mon Sep 17 00:00:00 2001 From: Asaf Shakarzy Date: Sun, 19 Dec 2021 16:54:40 +0200 Subject: [PATCH] feat: management separation - cluster endpoints are irrelevant any longer. - job list endpoint. - list resources for type endpoint. --- openapi/openapi.yaml | 71 ++---- .../resources/cluster/create_namespace.yml | 21 -- .../examples/curl/create_namespace.yml | 7 - .../models/create_namespace_request.yml | 9 - .../models/create_namespace_response.yml | 5 - .../cluster/requests/create_namespace.yml | 9 - .../resources/cluster/requests/examples.yml | 5 - .../cluster/responses/create_namespace.yml | 17 -- .../resources/cluster/responses/examples.yml | 3 - openapi/resources/health/alive.yml | 15 -- .../resources/health/examples/curl/alive.yml | 5 - .../health/models/health_response.yml | 12 - openapi/resources/health/ready.yml | 11 - .../resources/health/responses/examples.yml | 3 - openapi/resources/jobs/examples.yml | 15 ++ .../examples/curl/get_job.yml} | 2 +- openapi/resources/jobs/get_job.yml | 17 ++ openapi/resources/jobs/models/job.yml | 21 ++ openapi/resources/jobs/parameters.yml | 8 + .../get_secret.yml => jobs/responses/job.yml} | 8 +- .../examples/curl/create_resource_type.yml | 2 +- .../examples/curl/get_resource_type.yml | 2 +- .../examples/curl/list_resource_types.yml | 2 +- .../examples/curl/replace_resource_type.yml | 2 +- .../curl/list_resources_for_type.yml} | 2 +- .../resources/list_resources_for_type.yml | 24 ++ .../resources/resources/models/resource.yml | 9 + .../resources/models/resource_list.yml | 13 + .../resources/responses/examples.yml | 26 ++ .../responses/list_resources.yml} | 8 +- openapi/resources/scim_schemas/get_schema.yml | 2 +- openapi/resources/scim_schemas/parameters.yml | 3 +- .../resources/scim_schemas/replace_schema.yml | 2 +- .../secrets/examples/curl/put_secret.yml | 7 - .../secrets/examples/restish/get_secret.yml | 4 - .../secrets/examples/restish/put_secret.yml | 5 - openapi/resources/secrets/get_secret.yml | 18 -- openapi/resources/secrets/models/secret.yml | 6 - .../secrets/models/upsert_secret_response.yml | 6 - openapi/resources/secrets/parameters.yml | 8 - openapi/resources/secrets/put_secret.yml | 20 -- .../resources/secrets/requests/examples.yml | 5 - .../resources/secrets/requests/put_secret.yml | 9 - .../resources/secrets/responses/examples.yml | 10 - .../secrets/responses/put_secret.yml | 17 -- openapi/resources/tenants/activate_tenant.yml | 14 - openapi/resources/tenants/create_tenant.yml | 17 -- openapi/resources/tenants/delete_tenant.yml | 20 -- openapi/resources/tenants/examples.yml | 28 -- .../tenants/examples/curl/activate_tenant.yml | 5 - .../tenants/examples/curl/create_tenant.yml | 7 - .../tenants/examples/curl/del_tenant.yml | 6 - .../examples/curl/get_tenant_public.yml | 5 - .../tenants/examples/curl/patch_tenant.yml | 7 - .../tenants/examples/curl/register_tenant.yml | 6 - .../tenants/examples/curl/replace_tenant.yml | 7 - openapi/resources/tenants/get_tenant.yml | 17 -- .../resources/tenants/get_tenant_public.yml | 14 - openapi/resources/tenants/models/tenant.yml | 30 --- .../models/tenant_registration_request.yml | 22 -- .../models/tenant_registration_response.yml | 6 - openapi/resources/tenants/parameters.yml | 24 -- openapi/resources/tenants/patch_tenant.yml | 21 -- openapi/resources/tenants/register_tenant.yml | 17 -- openapi/resources/tenants/replace_tenant.yml | 21 -- .../requests/create_or_register_tenant.yml | 9 - .../resources/tenants/requests/examples.yml | 15 -- .../tenants/requests/patch_tenant.yml | 9 - .../tenants/requests/replace_tenant.yml | 9 - .../tenants/responses/get_tenant.yml | 17 -- .../tenants/responses/get_tenant_public.yml | 17 -- .../tenants/responses/register_tenant.yml | 17 -- .../resources/tenants/responses/tenant.yml | 17 -- openapi/shared/models/job.yml | 14 + package-lock.json | 241 ++++++++++-------- package.json | 2 +- 76 files changed, 315 insertions(+), 822 deletions(-) delete mode 100644 openapi/resources/cluster/create_namespace.yml delete mode 100644 openapi/resources/cluster/examples/curl/create_namespace.yml delete mode 100644 openapi/resources/cluster/models/create_namespace_request.yml delete mode 100644 openapi/resources/cluster/models/create_namespace_response.yml delete mode 100644 openapi/resources/cluster/requests/create_namespace.yml delete mode 100644 openapi/resources/cluster/requests/examples.yml delete mode 100644 openapi/resources/cluster/responses/create_namespace.yml delete mode 100644 openapi/resources/cluster/responses/examples.yml delete mode 100644 openapi/resources/health/alive.yml delete mode 100644 openapi/resources/health/examples/curl/alive.yml delete mode 100644 openapi/resources/health/models/health_response.yml delete mode 100644 openapi/resources/health/ready.yml delete mode 100644 openapi/resources/health/responses/examples.yml create mode 100644 openapi/resources/jobs/examples.yml rename openapi/resources/{secrets/examples/curl/get_secret.yml => jobs/examples/curl/get_job.yml} (64%) create mode 100644 openapi/resources/jobs/get_job.yml create mode 100644 openapi/resources/jobs/models/job.yml create mode 100644 openapi/resources/jobs/parameters.yml rename openapi/resources/{secrets/responses/get_secret.yml => jobs/responses/job.yml} (70%) rename openapi/resources/{tenants/examples/curl/get_tenant.yml => resources/examples/curl/list_resources_for_type.yml} (69%) create mode 100644 openapi/resources/resources/list_resources_for_type.yml create mode 100644 openapi/resources/resources/models/resource.yml create mode 100644 openapi/resources/resources/models/resource_list.yml create mode 100644 openapi/resources/resources/responses/examples.yml rename openapi/resources/{health/responses/health.yml => resources/responses/list_resources.yml} (67%) delete mode 100644 openapi/resources/secrets/examples/curl/put_secret.yml delete mode 100644 openapi/resources/secrets/examples/restish/get_secret.yml delete mode 100644 openapi/resources/secrets/examples/restish/put_secret.yml delete mode 100644 openapi/resources/secrets/get_secret.yml delete mode 100644 openapi/resources/secrets/models/secret.yml delete mode 100644 openapi/resources/secrets/models/upsert_secret_response.yml delete mode 100644 openapi/resources/secrets/parameters.yml delete mode 100644 openapi/resources/secrets/put_secret.yml delete mode 100644 openapi/resources/secrets/requests/examples.yml delete mode 100644 openapi/resources/secrets/requests/put_secret.yml delete mode 100644 openapi/resources/secrets/responses/examples.yml delete mode 100644 openapi/resources/secrets/responses/put_secret.yml delete mode 100644 openapi/resources/tenants/activate_tenant.yml delete mode 100644 openapi/resources/tenants/create_tenant.yml delete mode 100644 openapi/resources/tenants/delete_tenant.yml delete mode 100644 openapi/resources/tenants/examples.yml delete mode 100644 openapi/resources/tenants/examples/curl/activate_tenant.yml delete mode 100644 openapi/resources/tenants/examples/curl/create_tenant.yml delete mode 100644 openapi/resources/tenants/examples/curl/del_tenant.yml delete mode 100644 openapi/resources/tenants/examples/curl/get_tenant_public.yml delete mode 100644 openapi/resources/tenants/examples/curl/patch_tenant.yml delete mode 100644 openapi/resources/tenants/examples/curl/register_tenant.yml delete mode 100644 openapi/resources/tenants/examples/curl/replace_tenant.yml delete mode 100644 openapi/resources/tenants/get_tenant.yml delete mode 100644 openapi/resources/tenants/get_tenant_public.yml delete mode 100644 openapi/resources/tenants/models/tenant.yml delete mode 100644 openapi/resources/tenants/models/tenant_registration_request.yml delete mode 100644 openapi/resources/tenants/models/tenant_registration_response.yml delete mode 100644 openapi/resources/tenants/parameters.yml delete mode 100644 openapi/resources/tenants/patch_tenant.yml delete mode 100644 openapi/resources/tenants/register_tenant.yml delete mode 100644 openapi/resources/tenants/replace_tenant.yml delete mode 100644 openapi/resources/tenants/requests/create_or_register_tenant.yml delete mode 100644 openapi/resources/tenants/requests/examples.yml delete mode 100644 openapi/resources/tenants/requests/patch_tenant.yml delete mode 100644 openapi/resources/tenants/requests/replace_tenant.yml delete mode 100644 openapi/resources/tenants/responses/get_tenant.yml delete mode 100644 openapi/resources/tenants/responses/get_tenant_public.yml delete mode 100644 openapi/resources/tenants/responses/register_tenant.yml delete mode 100644 openapi/resources/tenants/responses/tenant.yml create mode 100644 openapi/shared/models/job.yml diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index bc2eb9b..7a6241c 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.3 info: - version: 1.0.0 + version: 2.0.0 title: Crossid API termsOfService: 'https://crossid.io/tos' contact: @@ -17,11 +17,14 @@ externalDocs: description: Find out more about CrossID url: 'https://www.crossid.io' servers: - - url: https://{tenant}.crossid.io/api/v1 + - url: https://{tenant}.{region}.crossid.io/api/v1 variables: tenant: default: acme description: Tenant Identifier + region: + defualt: us + description: The tenant region description: Development tags: - name: Secrets @@ -31,39 +34,11 @@ tags: x-tagGroups: - name: Tenant API tags: - - Secrets - - Tenants + - Resources - Schemas - Resource Types - - name: Global - tags: - - Namespaces - - Global Tenants - - Health + - Jobs paths: - # tenants - # - /api/v1/tenants/{id}: - get: - $ref: resources/tenants/get_tenant.yml - put: - $ref: resources/tenants/replace_tenant.yml - patch: - $ref: resources/tenants/patch_tenant.yml - /api/global/v1/tenants: - post: - $ref: resources/tenants/create_tenant.yml - get: - $ref: resources/tenants/get_tenant_public.yml - /api/global/v1/tenants/.register: - post: - $ref: resources/tenants/register_tenant.yml - /api/global/v1/tenants/.activate: - post: - $ref: resources/tenants/activate_tenant.yml - /api/global/v1/tenants/{id}: - delete: - $ref: resources/tenants/delete_tenant.yml # scim schemas # /api/v1/scim-schemas: @@ -86,38 +61,24 @@ paths: $ref: resources/resource_types/get_resource_type.yml put: $ref: resources/resource_types/replace_resource_type.yml - # secrets + # job # - /api/v1/secrets/{path}: + /api/v1/jobs/{id}: get: - $ref: resources/secrets/get_secret.yml - put: - $ref: resources/secrets/put_secret.yml - # namespace + $ref: resources/jobs/get_job.yml + # resources # - /api/global/v1/namespaces: - post: - $ref: resources/cluster/create_namespace.yml - # health - # - /api/global/v1/health/ready: - get: - $ref: resources/health/ready.yml - /api/global/v1/health/alive: + /api/v1/resources/{appID}/{resourceTypes}: get: - $ref: resources/health/alive.yml + $ref: resources/resources/list_resources_for_type.yml components: securitySchemes: oauth2: type: oauth2 flows: authorizationCode: - authorizationUrl: 'https://{tenant}.crossid.io/oauth2/auth' - tokenUrl: 'https://{tenant}.crossid.io/oauth2/token' + authorizationUrl: 'https://crossid.us.crossid.io/oauth2/auth' + tokenUrl: 'https://crossid.us.crossid.io/oauth2/token' scopes: - 'read:users': read users info + 'manage:read:users': read users info 'write:users': modify or remove users - namespaceApiKey: - type: http - scheme: bearer - bearerFormat: JWT diff --git a/openapi/resources/cluster/create_namespace.yml b/openapi/resources/cluster/create_namespace.yml deleted file mode 100644 index ee8c47e..0000000 --- a/openapi/resources/cluster/create_namespace.yml +++ /dev/null @@ -1,21 +0,0 @@ -operationId: createNamespace -summary: Create a namespace -description: | - A namespace is a service provider that provision, manage and deprovision [tenants](https://developer.crossid.io/docs/concepts/tenant). - - Typically a namespace represents a B2B SAAS service, where its tenants represent businesses. -security: - - namespaceApiKey: - - create:tenant - - write:integration -tags: - - Namespaces -requestBody: - $ref: requests/create_namespace.yml -responses: - '200': - $ref: responses/create_namespace.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/create_namespace.yml' diff --git a/openapi/resources/cluster/examples/curl/create_namespace.yml b/openapi/resources/cluster/examples/curl/create_namespace.yml deleted file mode 100644 index b210b71..0000000 --- a/openapi/resources/cluster/examples/curl/create_namespace.yml +++ /dev/null @@ -1,7 +0,0 @@ -lang: cURL -source: |- - curl -X POST \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $CID_NS_TOKEN" \ - -d '{"id": "mysaas", "displayName": "My SAAS", "publicTenantRegistration": false}' \ - "https://mysaas.crossid.io/api/global/v1/namespaces" diff --git a/openapi/resources/cluster/models/create_namespace_request.yml b/openapi/resources/cluster/models/create_namespace_request.yml deleted file mode 100644 index d2e534a..0000000 --- a/openapi/resources/cluster/models/create_namespace_request.yml +++ /dev/null @@ -1,9 +0,0 @@ -description: A request to create a namespace. -type: object -properties: - id: - type: string - displayName: - type: string - publicTenantRegistration: - type: boolean diff --git a/openapi/resources/cluster/models/create_namespace_response.yml b/openapi/resources/cluster/models/create_namespace_response.yml deleted file mode 100644 index 5a6800d..0000000 --- a/openapi/resources/cluster/models/create_namespace_response.yml +++ /dev/null @@ -1,5 +0,0 @@ -description: Create Namespace Response. -type: object -properties: - token: - type: string diff --git a/openapi/resources/cluster/requests/create_namespace.yml b/openapi/resources/cluster/requests/create_namespace.yml deleted file mode 100644 index 07a101f..0000000 --- a/openapi/resources/cluster/requests/create_namespace.yml +++ /dev/null @@ -1,9 +0,0 @@ -description: A namespace, in JSON format. - -content: - application/json: - schema: - $ref: ../models/create_namespace_request.yml - examples: - namespace: - $ref: examples.yml#/create_namespace_request diff --git a/openapi/resources/cluster/requests/examples.yml b/openapi/resources/cluster/requests/examples.yml deleted file mode 100644 index 9bf6017..0000000 --- a/openapi/resources/cluster/requests/examples.yml +++ /dev/null @@ -1,5 +0,0 @@ -create_namespace_request: - value: - id: mysaas - displayName: My SAAS - publicTenantRegistration: false diff --git a/openapi/resources/cluster/responses/create_namespace.yml b/openapi/resources/cluster/responses/create_namespace.yml deleted file mode 100644 index a6974a5..0000000 --- a/openapi/resources/cluster/responses/create_namespace.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: A namespace, in JSON format. - -content: - application/json: - schema: - $ref: ../models/create_namespace_response.yml - examples: - namespace: - $ref: examples.yml#/create_namespace_response - -headers: - ratelimit-limit: - $ref: ../../../shared/headers.yml#/ratelimit-limit - ratelimit-remaining: - $ref: ../../../shared/headers.yml#/ratelimit-remaining - ratelimit-reset: - $ref: ../../../shared/headers.yml#/ratelimit-reset diff --git a/openapi/resources/cluster/responses/examples.yml b/openapi/resources/cluster/responses/examples.yml deleted file mode 100644 index 3c3b5a9..0000000 --- a/openapi/resources/cluster/responses/examples.yml +++ /dev/null @@ -1,3 +0,0 @@ -create_namespace_response: - value: - token: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.... diff --git a/openapi/resources/health/alive.yml b/openapi/resources/health/alive.yml deleted file mode 100644 index fb04e63..0000000 --- a/openapi/resources/health/alive.yml +++ /dev/null @@ -1,15 +0,0 @@ -operationId: healthAlive -summary: Check aliveness -description: | - This endpoint returns an ok status (200) if the node is healthy or service unavailable (503) otherwise. - - This endpoint does not check the aliveness of a cluster rather a single node. -tags: - - Health -responses: - '200': - $ref: responses/health.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/alive.yml' diff --git a/openapi/resources/health/examples/curl/alive.yml b/openapi/resources/health/examples/curl/alive.yml deleted file mode 100644 index 843c2db..0000000 --- a/openapi/resources/health/examples/curl/alive.yml +++ /dev/null @@ -1,5 +0,0 @@ -lang: cURL -source: |- - curl -X GET \ - -H "Content-Type: application/json" \ - "https://{tenant}.crossid.io/api/global/v1/health/alive" diff --git a/openapi/resources/health/models/health_response.yml b/openapi/resources/health/models/health_response.yml deleted file mode 100644 index aad7f7f..0000000 --- a/openapi/resources/health/models/health_response.yml +++ /dev/null @@ -1,12 +0,0 @@ -description: Health check response model -type: object -properties: - status: - type: string - enum: ['OK', 'Service Unavailable'] - errors: - type: object - additionalProperties: - type: string -required: - - status diff --git a/openapi/resources/health/ready.yml b/openapi/resources/health/ready.yml deleted file mode 100644 index 3f723dc..0000000 --- a/openapi/resources/health/ready.yml +++ /dev/null @@ -1,11 +0,0 @@ -operationId: healthReady -summary: Check readiness -description: | - This endpoint returns an ok status (200) if the node is ready to handle requests. -tags: - - Health -responses: - '200': - $ref: responses/health.yml - default: - $ref: ../../shared/responses/default_error.yml diff --git a/openapi/resources/health/responses/examples.yml b/openapi/resources/health/responses/examples.yml deleted file mode 100644 index 221b59f..0000000 --- a/openapi/resources/health/responses/examples.yml +++ /dev/null @@ -1,3 +0,0 @@ -health: - value: - status: OK diff --git a/openapi/resources/jobs/examples.yml b/openapi/resources/jobs/examples.yml new file mode 100644 index 0000000..488758e --- /dev/null +++ b/openapi/resources/jobs/examples.yml @@ -0,0 +1,15 @@ +job: + value: + id: T1e642kLYG3iZYGjo5REVW + error: Item already exists. + status: fatal + statusCode: 500 + reason: Creating a new user. + meta: + tenantId: acme + appId: '-' + resourceType: Job + created: '2021-09-13T19:00:14.646Z' + lastModified: '2021-09-13T19:00:14.646Z' + revision: 1 + location: '/jobs/T1e642kLYG3iZYGjo5REVW' diff --git a/openapi/resources/secrets/examples/curl/get_secret.yml b/openapi/resources/jobs/examples/curl/get_job.yml similarity index 64% rename from openapi/resources/secrets/examples/curl/get_secret.yml rename to openapi/resources/jobs/examples/curl/get_job.yml index 16515cf..c57f8f0 100644 --- a/openapi/resources/secrets/examples/curl/get_secret.yml +++ b/openapi/resources/jobs/examples/curl/get_job.yml @@ -3,4 +3,4 @@ source: |- curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $CID_TOKEN" \ - "https://{tenant}.crossid.io/api/v1/secrets/secret/db_user" + "https://acme.us.crossid.io/api/v1/jobs/T1e642kLYG3iZYGjo5REVW" diff --git a/openapi/resources/jobs/get_job.yml b/openapi/resources/jobs/get_job.yml new file mode 100644 index 0000000..6c93c2c --- /dev/null +++ b/openapi/resources/jobs/get_job.yml @@ -0,0 +1,17 @@ +operationId: getJob +summary: Retrieve a Job. +description: Retrieve details about an existing Job by its id. +security: + - oauth2: + - job.read +tags: + - Jobs +parameters: + - $ref: parameters.yml#/id +responses: + '200': + $ref: responses/job.yml + default: + $ref: ../../shared/responses/default_error.yml +x-codeSamples: + - $ref: 'examples/curl/get_job.yml' diff --git a/openapi/resources/jobs/models/job.yml b/openapi/resources/jobs/models/job.yml new file mode 100644 index 0000000..0adde69 --- /dev/null +++ b/openapi/resources/jobs/models/job.yml @@ -0,0 +1,21 @@ +description: Job model. +type: object +properties: + id: + type: string + description: Unique identifier of the job. + error: + type: string + description: Error message in case of a failure. + status: + type: string + enum: ['enqueued', 'started', 'failed', 'fatal', 'canceled', 'success'] + description: The current status of the job. + statusCode: + type: number + description: The current status code of the job, corresponds to http status codes. + reason: + type: string + description: A descriptive reason describing the purpose of the job. + meta: + $ref: ../../../shared/models/meta.yml diff --git a/openapi/resources/jobs/parameters.yml b/openapi/resources/jobs/parameters.yml new file mode 100644 index 0000000..7e53dfc --- /dev/null +++ b/openapi/resources/jobs/parameters.yml @@ -0,0 +1,8 @@ +id: + description: The job ID + in: path + name: id + required: true + schema: + type: string + example: T1e642kLYG3iZYGjo5REVW diff --git a/openapi/resources/secrets/responses/get_secret.yml b/openapi/resources/jobs/responses/job.yml similarity index 70% rename from openapi/resources/secrets/responses/get_secret.yml rename to openapi/resources/jobs/responses/job.yml index 099c494..6e815d4 100644 --- a/openapi/resources/secrets/responses/get_secret.yml +++ b/openapi/resources/jobs/responses/job.yml @@ -1,12 +1,12 @@ -description: A secret, in JSON format. +description: A Job, in JSON format. content: application/json: schema: - $ref: ../models/secret.yml + $ref: ../models/job.yml examples: - secret: - $ref: examples.yml#/secret + schema: + $ref: ../examples.yml#/job headers: ratelimit-limit: diff --git a/openapi/resources/resource_types/examples/curl/create_resource_type.yml b/openapi/resources/resource_types/examples/curl/create_resource_type.yml index 2972120..0a50a61 100644 --- a/openapi/resources/resource_types/examples/curl/create_resource_type.yml +++ b/openapi/resources/resource_types/examples/curl/create_resource_type.yml @@ -4,4 +4,4 @@ source: |- -H "Content-Type: application/json" \ -H "Authorization: Bearer $CID_TOKEN" \ -d '{"name": "User", "appId": "myapp", "schema": "scimUser", "mode": "local"}' \ - "https://acme.crossid.io/api/v1/resource-types?reason=my-app" + "https://acme.us.crossid.io/api/v1/resource-types?reason=my-app" diff --git a/openapi/resources/resource_types/examples/curl/get_resource_type.yml b/openapi/resources/resource_types/examples/curl/get_resource_type.yml index c5aa1b9..6fda6e1 100644 --- a/openapi/resources/resource_types/examples/curl/get_resource_type.yml +++ b/openapi/resources/resource_types/examples/curl/get_resource_type.yml @@ -3,4 +3,4 @@ source: |- curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $CID_TOKEN" \ - "https://acme.crossid.io/api/v1/resource-types/T9e682kLYG6iYFSjo5RJVW" + "https://acme.us.crossid.io/api/v1/resource-types/T9e682kLYG6iYFSjo5RJVW" diff --git a/openapi/resources/resource_types/examples/curl/list_resource_types.yml b/openapi/resources/resource_types/examples/curl/list_resource_types.yml index c828d39..724ac73 100644 --- a/openapi/resources/resource_types/examples/curl/list_resource_types.yml +++ b/openapi/resources/resource_types/examples/curl/list_resource_types.yml @@ -3,4 +3,4 @@ source: |- curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $CID_TOKEN" \ - "https://acme.crossid.io/api/v1/resource-types + "https://acme.us.crossid.io/api/v1/resource-types diff --git a/openapi/resources/resource_types/examples/curl/replace_resource_type.yml b/openapi/resources/resource_types/examples/curl/replace_resource_type.yml index 02c8156..07aad80 100644 --- a/openapi/resources/resource_types/examples/curl/replace_resource_type.yml +++ b/openapi/resources/resource_types/examples/curl/replace_resource_type.yml @@ -4,4 +4,4 @@ source: |- -H "Content-Type: application/json" \ -H "Authorization: Bearer $CID_TOKEN" \ -d '{"name": "User", "appId": "myapp", "schema": "scimUser", "mode": "local"}' \ - "https://acme.crossid.io/api/v1/resource-types/T9e682kLYG6iYFSjo5RJVW?reason=my-app" + "https://acme.us.crossid.io/api/v1/resource-types/T9e682kLYG6iYFSjo5RJVW?reason=my-app" diff --git a/openapi/resources/tenants/examples/curl/get_tenant.yml b/openapi/resources/resources/examples/curl/list_resources_for_type.yml similarity index 69% rename from openapi/resources/tenants/examples/curl/get_tenant.yml rename to openapi/resources/resources/examples/curl/list_resources_for_type.yml index 6b6b5c4..3952438 100644 --- a/openapi/resources/tenants/examples/curl/get_tenant.yml +++ b/openapi/resources/resources/examples/curl/list_resources_for_type.yml @@ -3,4 +3,4 @@ source: |- curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $CID_TOKEN" \ - "https://{tenant}.crossid.io/api/v1/tenants/acme" + "https://acme.us.crossid.io/api/v1/resources/Users diff --git a/openapi/resources/resources/list_resources_for_type.yml b/openapi/resources/resources/list_resources_for_type.yml new file mode 100644 index 0000000..4c69955 --- /dev/null +++ b/openapi/resources/resources/list_resources_for_type.yml @@ -0,0 +1,24 @@ +operationId: listResourcesOfType +summary: List resources of a specific type +description: Retrieve a list of existing resources of a specific type. +security: + - oauth2: + - resource.read +tags: + - Resources +parameters: + - $ref: ../../shared/parameters.yml#/filter + - $ref: ../../shared/parameters.yml#/count + - $ref: ../../shared/parameters.yml#/startIndex + - $ref: ../../shared/parameters.yml#/sortBy + - $ref: ../../shared/parameters.yml#/sortOrder + - $ref: ../../shared/parameters.yml#/attributes + - $ref: ../../shared/parameters.yml#/excludedAttributes + - $ref: ../../shared/parameters.yml#/forTime +responses: + '200': + $ref: responses/list_resources.yml + default: + $ref: ../../shared/responses/default_error.yml +x-codeSamples: + - $ref: 'examples/curl/list_resources_for_type.yml' diff --git a/openapi/resources/resources/models/resource.yml b/openapi/resources/resources/models/resource.yml new file mode 100644 index 0000000..d55d1e2 --- /dev/null +++ b/openapi/resources/resources/models/resource.yml @@ -0,0 +1,9 @@ +description: Resource model. +type: object +properties: + id: + type: string + description: unique identifier of the schema. + meta: + $ref: ../../../shared/models/meta.yml + additionalProperties: true diff --git a/openapi/resources/resources/models/resource_list.yml b/openapi/resources/resources/models/resource_list.yml new file mode 100644 index 0000000..13a3695 --- /dev/null +++ b/openapi/resources/resources/models/resource_list.yml @@ -0,0 +1,13 @@ +description: A list of resources. +allOf: + - $ref: ../../../shared/models/list.yml + - type: object + required: + - Resources + # TODO hack until https://github.com/Redocly/openapi-cli/issues/235 + additionalProperties: true + properties: + Resources: + type: array + items: + $ref: ./resource.yml diff --git a/openapi/resources/resources/responses/examples.yml b/openapi/resources/resources/responses/examples.yml new file mode 100644 index 0000000..382aa1d --- /dev/null +++ b/openapi/resources/resources/responses/examples.yml @@ -0,0 +1,26 @@ +resourceList: + value: + totalResults: 6 + itemsPerPage: 10 + startIndex: 0 + Resources: + # todo cannot find a way to ref in examples + - id: HcRFTpgpmnUGSCEoj8wU4 + displayName: John Doe + active: true + userName: john.doe@acme.io + name: + givenName: John + familyName: Doe + emails: + - primary: true + type: work + value: john.doe@acme.io + meta: + tenantId: acme + appId: iam + resourceType: User + created: '2021-09-13T19:00:14.646Z' + lastModified: '2021-09-13T19:00:14.646Z' + revision: 1 + location: '/resources/cid/Users/HcRFTpgpmnUGSCEoj8wU4' diff --git a/openapi/resources/health/responses/health.yml b/openapi/resources/resources/responses/list_resources.yml similarity index 67% rename from openapi/resources/health/responses/health.yml rename to openapi/resources/resources/responses/list_resources.yml index d7bf6c2..2bfc7eb 100644 --- a/openapi/resources/health/responses/health.yml +++ b/openapi/resources/resources/responses/list_resources.yml @@ -1,12 +1,12 @@ -description: Health response, in JSON format. +description: A paged list of resources. content: application/json: schema: - $ref: ../models/health_response.yml + $ref: ../models/resource_list.yml examples: - secret: - $ref: examples.yml#/health + resourceType: + $ref: examples.yml#/resourceList headers: ratelimit-limit: diff --git a/openapi/resources/scim_schemas/get_schema.yml b/openapi/resources/scim_schemas/get_schema.yml index 2c757bb..198da8f 100644 --- a/openapi/resources/scim_schemas/get_schema.yml +++ b/openapi/resources/scim_schemas/get_schema.yml @@ -7,7 +7,7 @@ security: tags: - Schemas parameters: - - $ref: parameters.yml#/id + - $ref: parameters.yml#/schemaId responses: '200': $ref: responses/schema.yml diff --git a/openapi/resources/scim_schemas/parameters.yml b/openapi/resources/scim_schemas/parameters.yml index e72dacd..9f3367b 100644 --- a/openapi/resources/scim_schemas/parameters.yml +++ b/openapi/resources/scim_schemas/parameters.yml @@ -1,4 +1,5 @@ -id: +# 'id' causes two schemas are referenced with the same name but different content. Renamed parameters_id to parameters_id-2. +schemaId: description: The schema ID in: path name: id diff --git a/openapi/resources/scim_schemas/replace_schema.yml b/openapi/resources/scim_schemas/replace_schema.yml index a6c2748..f42e407 100644 --- a/openapi/resources/scim_schemas/replace_schema.yml +++ b/openapi/resources/scim_schemas/replace_schema.yml @@ -7,7 +7,7 @@ security: tags: - Schemas parameters: - - $ref: parameters.yml#/id + - $ref: parameters.yml#/schemaId - $ref: ../../shared/parameters.yml#/reason requestBody: $ref: requests/replace_schema.yml diff --git a/openapi/resources/secrets/examples/curl/put_secret.yml b/openapi/resources/secrets/examples/curl/put_secret.yml deleted file mode 100644 index bf98071..0000000 --- a/openapi/resources/secrets/examples/curl/put_secret.yml +++ /dev/null @@ -1,7 +0,0 @@ -lang: cURL -source: |- - curl -X PUT \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $CID_TOKEN" \ - -d '{"data": {"user": "root", "secret": "passwd"}}' \ - "https://{tenant}.crossid.io/api/v1/secrets/secret/db_user" diff --git a/openapi/resources/secrets/examples/restish/get_secret.yml b/openapi/resources/secrets/examples/restish/get_secret.yml deleted file mode 100644 index 01dc36c..0000000 --- a/openapi/resources/secrets/examples/restish/get_secret.yml +++ /dev/null @@ -1,4 +0,0 @@ -lang: restish -source: |- - restish -t cid \ - get-secret /secret/mypass diff --git a/openapi/resources/secrets/examples/restish/put_secret.yml b/openapi/resources/secrets/examples/restish/put_secret.yml deleted file mode 100644 index 02e3258..0000000 --- a/openapi/resources/secrets/examples/restish/put_secret.yml +++ /dev/null @@ -1,5 +0,0 @@ -lang: restish -source: |- - restish -t cid \ - put-secret /secret/db_user \ - data{secret: foo, user: bar} diff --git a/openapi/resources/secrets/get_secret.yml b/openapi/resources/secrets/get_secret.yml deleted file mode 100644 index 4d34c97..0000000 --- a/openapi/resources/secrets/get_secret.yml +++ /dev/null @@ -1,18 +0,0 @@ -operationId: getSecret -summary: Retrieve an existing Secret -description: Retrieve details about an existing secret by its path. -security: - - oauth2: - - read:secret -tags: - - Secrets -parameters: - - $ref: parameters.yml#/path -responses: - '200': - $ref: responses/get_secret.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/get_secret.yml' - - $ref: 'examples/restish/get_secret.yml' diff --git a/openapi/resources/secrets/models/secret.yml b/openapi/resources/secrets/models/secret.yml deleted file mode 100644 index b483e41..0000000 --- a/openapi/resources/secrets/models/secret.yml +++ /dev/null @@ -1,6 +0,0 @@ -description: A secret -type: object -properties: - data: - type: object - additionalProperties: true diff --git a/openapi/resources/secrets/models/upsert_secret_response.yml b/openapi/resources/secrets/models/upsert_secret_response.yml deleted file mode 100644 index 5e445d8..0000000 --- a/openapi/resources/secrets/models/upsert_secret_response.yml +++ /dev/null @@ -1,6 +0,0 @@ -description: A response of creating or updating an existing secret. -type: object -properties: - data: - type: object - additionalProperties: true diff --git a/openapi/resources/secrets/parameters.yml b/openapi/resources/secrets/parameters.yml deleted file mode 100644 index 6895e97..0000000 --- a/openapi/resources/secrets/parameters.yml +++ /dev/null @@ -1,8 +0,0 @@ -path: - description: The secret path - in: path - name: path - required: true - schema: - type: string - example: /secret/mypass diff --git a/openapi/resources/secrets/put_secret.yml b/openapi/resources/secrets/put_secret.yml deleted file mode 100644 index f69e755..0000000 --- a/openapi/resources/secrets/put_secret.yml +++ /dev/null @@ -1,20 +0,0 @@ -operationId: putSecret -summary: Upsert an Secret -description: Create or if exists update the given secret. -security: - - oauth2: - - write:secret -tags: - - Secrets -parameters: - - $ref: parameters.yml#/path -requestBody: - $ref: requests/put_secret.yml -responses: - '200': - $ref: responses/put_secret.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/put_secret.yml' - - $ref: 'examples/restish/put_secret.yml' diff --git a/openapi/resources/secrets/requests/examples.yml b/openapi/resources/secrets/requests/examples.yml deleted file mode 100644 index d099223..0000000 --- a/openapi/resources/secrets/requests/examples.yml +++ /dev/null @@ -1,5 +0,0 @@ -secret: - value: - data: - user: root - secret: passwd diff --git a/openapi/resources/secrets/requests/put_secret.yml b/openapi/resources/secrets/requests/put_secret.yml deleted file mode 100644 index 9bc3979..0000000 --- a/openapi/resources/secrets/requests/put_secret.yml +++ /dev/null @@ -1,9 +0,0 @@ -description: A secret, in JSON format. - -content: - application/json: - schema: - $ref: ../models/secret.yml - examples: - secret: - $ref: examples.yml#/secret diff --git a/openapi/resources/secrets/responses/examples.yml b/openapi/resources/secrets/responses/examples.yml deleted file mode 100644 index 8eab3c0..0000000 --- a/openapi/resources/secrets/responses/examples.yml +++ /dev/null @@ -1,10 +0,0 @@ -secret: - value: - data: - user: root - secret: passwd - -upsert_secret: - value: - data: - version: 2 diff --git a/openapi/resources/secrets/responses/put_secret.yml b/openapi/resources/secrets/responses/put_secret.yml deleted file mode 100644 index b6eb97a..0000000 --- a/openapi/resources/secrets/responses/put_secret.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: A secret, in JSON format. - -content: - application/json: - schema: - $ref: ../models/upsert_secret_response.yml - examples: - secret: - $ref: examples.yml#/upsert_secret - -headers: - ratelimit-limit: - $ref: ../../../shared/headers.yml#/ratelimit-limit - ratelimit-remaining: - $ref: ../../../shared/headers.yml#/ratelimit-remaining - ratelimit-reset: - $ref: ../../../shared/headers.yml#/ratelimit-reset diff --git a/openapi/resources/tenants/activate_tenant.yml b/openapi/resources/tenants/activate_tenant.yml deleted file mode 100644 index 5a9d2b1..0000000 --- a/openapi/resources/tenants/activate_tenant.yml +++ /dev/null @@ -1,14 +0,0 @@ -operationId: activateTenant -summary: Activate a tenant registration. -description: Activate a tenant by an activation token, once registration completed. -tags: - - Global Tenants -parameters: - - $ref: parameters.yml#/activation -responses: - '200': - $ref: responses/tenant.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/activate_tenant.yml' diff --git a/openapi/resources/tenants/create_tenant.yml b/openapi/resources/tenants/create_tenant.yml deleted file mode 100644 index df3fe38..0000000 --- a/openapi/resources/tenants/create_tenant.yml +++ /dev/null @@ -1,17 +0,0 @@ -operationId: createTenant -summary: Create a new Tenant -description: Create a new tenant with the given payload. -security: - - namespaceApiKey: - - create:tenant -tags: - - Global Tenants -requestBody: - $ref: requests/create_or_register_tenant.yml -responses: - '200': - $ref: responses/tenant.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/create_tenant.yml' diff --git a/openapi/resources/tenants/delete_tenant.yml b/openapi/resources/tenants/delete_tenant.yml deleted file mode 100644 index b0a6ffe..0000000 --- a/openapi/resources/tenants/delete_tenant.yml +++ /dev/null @@ -1,20 +0,0 @@ -operationId: delTenant -summary: Delete an existing tenant, along with its resources. -description: | - Delete an existing tenant, along with all of its associated resources. - - **WARNING: This operation cannot be undone!** -security: - - namespaceApiKey: - - delete:tenant -tags: - - Global Tenants -parameters: - - $ref: parameters.yml#/id -responses: - '204': - $ref: ../../shared/responses/no_content.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/del_tenant.yml' diff --git a/openapi/resources/tenants/examples.yml b/openapi/resources/tenants/examples.yml deleted file mode 100644 index 4a6bd7a..0000000 --- a/openapi/resources/tenants/examples.yml +++ /dev/null @@ -1,28 +0,0 @@ -tenant: - value: - id: acme - active: true - namespace: root - host: acme.crossid.io - displayName: ACME - subscriptions: - - directory - meta: - resourceType: 'Tenant' - created: '2021-09-12T22:18:30.28Z' - lastModified: '2021-09-12T22:18:30.28Z' - revision: 0 - location: /tenants/acme - tenantId: _ - appId: '_' - -tenant_registration_response: - value: - result: ok - -tenant_sanitized: - value: - id: acme - active: true - host: acme.crossid.io - displayName: ACME diff --git a/openapi/resources/tenants/examples/curl/activate_tenant.yml b/openapi/resources/tenants/examples/curl/activate_tenant.yml deleted file mode 100644 index 56c30fd..0000000 --- a/openapi/resources/tenants/examples/curl/activate_tenant.yml +++ /dev/null @@ -1,5 +0,0 @@ -lang: cURL -source: |- - curl -X POST \ - -H "Content-Type: application/json" \ - "https://{namespace}.crossid.io/api/global/v1/tenants/.activate?activation={activation_key}" diff --git a/openapi/resources/tenants/examples/curl/create_tenant.yml b/openapi/resources/tenants/examples/curl/create_tenant.yml deleted file mode 100644 index 883f77b..0000000 --- a/openapi/resources/tenants/examples/curl/create_tenant.yml +++ /dev/null @@ -1,7 +0,0 @@ -lang: cURL -source: |- - curl -X POST \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $CID_NS_TOKEN" \ - -d '{"displayName": "ACME", "tenantId": "acme", "type": "developer", "user": {"email": "marvin@acme.io", "displayName": "Marvin Acme", "password": "ToonTown0z!"}}' \ - "https://{namespace}.crossid.io/api/v1/tenants/acme" diff --git a/openapi/resources/tenants/examples/curl/del_tenant.yml b/openapi/resources/tenants/examples/curl/del_tenant.yml deleted file mode 100644 index ea4abe9..0000000 --- a/openapi/resources/tenants/examples/curl/del_tenant.yml +++ /dev/null @@ -1,6 +0,0 @@ -lang: cURL -source: |- - curl -X DELETE \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $CID_NS_TOKEN" \ - "https://{namespace}.crossid.io/api/global/v1/tenants/acme" diff --git a/openapi/resources/tenants/examples/curl/get_tenant_public.yml b/openapi/resources/tenants/examples/curl/get_tenant_public.yml deleted file mode 100644 index 417f1e3..0000000 --- a/openapi/resources/tenants/examples/curl/get_tenant_public.yml +++ /dev/null @@ -1,5 +0,0 @@ -lang: cURL -source: |- - curl -X GET \ - -H "Content-Type: application/json" \ - "https://{namespace}.crossid.io/api/global/v1/tenants?host=acme.crossid.io" diff --git a/openapi/resources/tenants/examples/curl/patch_tenant.yml b/openapi/resources/tenants/examples/curl/patch_tenant.yml deleted file mode 100644 index 4ba8142..0000000 --- a/openapi/resources/tenants/examples/curl/patch_tenant.yml +++ /dev/null @@ -1,7 +0,0 @@ -lang: cURL -source: |- - curl -X PATCH \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $CID_TOKEN" \ - -d '{"Operations": [{"op": "replace", "path": "/displayName", "value": "my new company name"}]}' \ - "https://{tenant}.crossid.io/api/v1/tenants/acme" diff --git a/openapi/resources/tenants/examples/curl/register_tenant.yml b/openapi/resources/tenants/examples/curl/register_tenant.yml deleted file mode 100644 index d91ffb9..0000000 --- a/openapi/resources/tenants/examples/curl/register_tenant.yml +++ /dev/null @@ -1,6 +0,0 @@ -lang: cURL -source: |- - curl -X POST \ - -H "Content-Type: application/json" \ - -d '{"displayName": "ACME", "tenantId": "acme", "type": "developer", "user": {"email": "marvin@acme.io", "displayName": "Marvin Acme", "password": "ToonTown0z!"}}' \ - "https://{namespace}.crossid.io/api/global/v1/tenants/.register" diff --git a/openapi/resources/tenants/examples/curl/replace_tenant.yml b/openapi/resources/tenants/examples/curl/replace_tenant.yml deleted file mode 100644 index c874735..0000000 --- a/openapi/resources/tenants/examples/curl/replace_tenant.yml +++ /dev/null @@ -1,7 +0,0 @@ -lang: cURL -source: |- - curl -X PUT \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $CID_TOKEN" \ - -d '{{"displayName": "ACME", "active": "true", ...}' \ - "https://{tenant}.crossid.io/api/v1/tenants/acme" diff --git a/openapi/resources/tenants/get_tenant.yml b/openapi/resources/tenants/get_tenant.yml deleted file mode 100644 index 9e00522..0000000 --- a/openapi/resources/tenants/get_tenant.yml +++ /dev/null @@ -1,17 +0,0 @@ -operationId: getTenant -summary: Retrieve a tenant manifest. -description: Retrieve details about an existing tenant by its id. -security: - - oauth2: - - read:tenant -tags: - - Tenants -parameters: - - $ref: parameters.yml#/id -responses: - '200': - $ref: responses/get_tenant.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/get_tenant.yml' diff --git a/openapi/resources/tenants/get_tenant_public.yml b/openapi/resources/tenants/get_tenant_public.yml deleted file mode 100644 index e3ca46f..0000000 --- a/openapi/resources/tenants/get_tenant_public.yml +++ /dev/null @@ -1,14 +0,0 @@ -operationId: getTenantByHost -summary: Retrieve a tenant. -description: Retrieve sanitized (public) details about an existing tenant, by its host. -tags: - - Global Tenants -parameters: - - $ref: parameters.yml#/host -responses: - '200': - $ref: responses/get_tenant_public.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/get_tenant_public.yml' diff --git a/openapi/resources/tenants/models/tenant.yml b/openapi/resources/tenants/models/tenant.yml deleted file mode 100644 index f7fb6df..0000000 --- a/openapi/resources/tenants/models/tenant.yml +++ /dev/null @@ -1,30 +0,0 @@ -description: A tenant model. -type: object -properties: - id: - type: string - namespace: - type: string - displayName: - type: string - active: - type: boolean - host: - type: string - subscriptions: - type: array - items: - type: string - logoUrl: - type: string - phoneNumber: - type: string - supportEmail: - type: string - supportUrl: - type: string - settings: - type: object - additionalProperties: true - meta: - $ref: ../../../shared/models/meta.yml diff --git a/openapi/resources/tenants/models/tenant_registration_request.yml b/openapi/resources/tenants/models/tenant_registration_request.yml deleted file mode 100644 index f6f2aa3..0000000 --- a/openapi/resources/tenants/models/tenant_registration_request.yml +++ /dev/null @@ -1,22 +0,0 @@ -description: Tenant registration request. -type: object -properties: - tenantId: - type: string - displayName: - type: string - type: - type: string - enum: - - developer - user: - type: object - properties: - email: - type: string - displayName: - type: string - password: - type: string - meta: - $ref: ../../../shared/models/meta.yml diff --git a/openapi/resources/tenants/models/tenant_registration_response.yml b/openapi/resources/tenants/models/tenant_registration_response.yml deleted file mode 100644 index 9bb5050..0000000 --- a/openapi/resources/tenants/models/tenant_registration_response.yml +++ /dev/null @@ -1,6 +0,0 @@ -description: Tenant registration response. -type: object -properties: - result: - type: string - enum: [ok] diff --git a/openapi/resources/tenants/parameters.yml b/openapi/resources/tenants/parameters.yml deleted file mode 100644 index dfce47b..0000000 --- a/openapi/resources/tenants/parameters.yml +++ /dev/null @@ -1,24 +0,0 @@ -id: - description: The tenant ID - in: path - name: id - required: true - schema: - type: string - example: acme -host: - description: The tenant public host (DNS name). - in: query - name: host - required: true - schema: - type: string - example: acme.crossid.io -activation: - description: The tenant activation key - in: query - name: activation - required: true - schema: - type: string - example: qTsBuJJEhCEzryZ_jk9Ucb0gMUVTBFqEJRcwd_z57R4= diff --git a/openapi/resources/tenants/patch_tenant.yml b/openapi/resources/tenants/patch_tenant.yml deleted file mode 100644 index a024f32..0000000 --- a/openapi/resources/tenants/patch_tenant.yml +++ /dev/null @@ -1,21 +0,0 @@ -operationId: patchTenant -summary: Patch an existing Tenant -description: Partial update an existing tenant with the given changes. -security: - - oauth2: - - write:tenant -tags: - - Tenants -parameters: - - $ref: parameters.yml#/id -requestBody: - $ref: requests/patch_tenant.yml -responses: - '200': - $ref: responses/tenant.yml - '400': - $ref: ../../shared/responses/validation_error.yml - default: - $ref: ../../shared/responses/default_error.yml -#x-codeSamples: -# - $ref: 'examples/curl/patch_tenant.yml' diff --git a/openapi/resources/tenants/register_tenant.yml b/openapi/resources/tenants/register_tenant.yml deleted file mode 100644 index d1d5ca4..0000000 --- a/openapi/resources/tenants/register_tenant.yml +++ /dev/null @@ -1,17 +0,0 @@ -operationId: registerTenant -summary: Register a new Tenant -description: | - Register a new tenant with the given payload. - - This is a poublic endpoint and requires activation. -tags: - - Global Tenants -requestBody: - $ref: requests/create_or_register_tenant.yml -responses: - '200': - $ref: responses/register_tenant.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/register_tenant.yml' diff --git a/openapi/resources/tenants/replace_tenant.yml b/openapi/resources/tenants/replace_tenant.yml deleted file mode 100644 index b315fe4..0000000 --- a/openapi/resources/tenants/replace_tenant.yml +++ /dev/null @@ -1,21 +0,0 @@ -operationId: replaceTenant -summary: Replace an existing Tenant -description: Replace an existing tenant with the given one. -security: - - oauth2: - - write:tenant -tags: - - Tenants -parameters: - - $ref: parameters.yml#/id -requestBody: - $ref: requests/replace_tenant.yml -responses: - '200': - $ref: responses/tenant.yml - '400': - $ref: ../../shared/responses/validation_error.yml - default: - $ref: ../../shared/responses/default_error.yml -x-codeSamples: - - $ref: 'examples/curl/replace_tenant.yml' diff --git a/openapi/resources/tenants/requests/create_or_register_tenant.yml b/openapi/resources/tenants/requests/create_or_register_tenant.yml deleted file mode 100644 index e67befd..0000000 --- a/openapi/resources/tenants/requests/create_or_register_tenant.yml +++ /dev/null @@ -1,9 +0,0 @@ -description: A tenant registration request, in JSON format. - -content: - application/json: - schema: - $ref: ../models/tenant_registration_request.yml - examples: - tenant: - $ref: examples.yml#/create_tenant_request diff --git a/openapi/resources/tenants/requests/examples.yml b/openapi/resources/tenants/requests/examples.yml deleted file mode 100644 index 981f163..0000000 --- a/openapi/resources/tenants/requests/examples.yml +++ /dev/null @@ -1,15 +0,0 @@ -patch_tenant: - value: - Operations: - - op: replace - path: /displayName - value: my new company name -create_tenant_request: - value: - displayName: ACME - tenantId: acme - type: developer - user: - email: marvin@acme.io - displayName: Marvin Acme - password: ToonTown0z! diff --git a/openapi/resources/tenants/requests/patch_tenant.yml b/openapi/resources/tenants/requests/patch_tenant.yml deleted file mode 100644 index 7cfc08c..0000000 --- a/openapi/resources/tenants/requests/patch_tenant.yml +++ /dev/null @@ -1,9 +0,0 @@ -description: A patch, in JSON format. - -content: - application/json: - schema: - $ref: ../../../shared/models/patch.yml - examples: - tenant: - $ref: ./examples.yml#/patch_tenant diff --git a/openapi/resources/tenants/requests/replace_tenant.yml b/openapi/resources/tenants/requests/replace_tenant.yml deleted file mode 100644 index 837aef2..0000000 --- a/openapi/resources/tenants/requests/replace_tenant.yml +++ /dev/null @@ -1,9 +0,0 @@ -description: A tenant, in JSON format. - -content: - application/json: - schema: - $ref: ../models/tenant.yml - examples: - secret: - $ref: ../examples.yml#/tenant diff --git a/openapi/resources/tenants/responses/get_tenant.yml b/openapi/resources/tenants/responses/get_tenant.yml deleted file mode 100644 index 01b9ff7..0000000 --- a/openapi/resources/tenants/responses/get_tenant.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: A tenant, in JSON format. - -content: - application/json: - schema: - $ref: ../models/tenant.yml - examples: - tenant: - $ref: ../examples.yml#/tenant - -headers: - ratelimit-limit: - $ref: ../../../shared/headers.yml#/ratelimit-limit - ratelimit-remaining: - $ref: ../../../shared/headers.yml#/ratelimit-remaining - ratelimit-reset: - $ref: ../../../shared/headers.yml#/ratelimit-reset diff --git a/openapi/resources/tenants/responses/get_tenant_public.yml b/openapi/resources/tenants/responses/get_tenant_public.yml deleted file mode 100644 index be3b6f1..0000000 --- a/openapi/resources/tenants/responses/get_tenant_public.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: A sanitized tenant, in JSON format. - -content: - application/json: - schema: - $ref: ../models/tenant.yml - examples: - tenant: - $ref: ../examples.yml#/tenant_sanitized - -headers: - ratelimit-limit: - $ref: ../../../shared/headers.yml#/ratelimit-limit - ratelimit-remaining: - $ref: ../../../shared/headers.yml#/ratelimit-remaining - ratelimit-reset: - $ref: ../../../shared/headers.yml#/ratelimit-reset diff --git a/openapi/resources/tenants/responses/register_tenant.yml b/openapi/resources/tenants/responses/register_tenant.yml deleted file mode 100644 index 8aac9bb..0000000 --- a/openapi/resources/tenants/responses/register_tenant.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: A response of tenant registration, in JSON format. - -content: - application/json: - schema: - $ref: ../models/tenant_registration_response.yml - examples: - tenant: - $ref: ../examples.yml#/tenant_registration_response - -headers: - ratelimit-limit: - $ref: ../../../shared/headers.yml#/ratelimit-limit - ratelimit-remaining: - $ref: ../../../shared/headers.yml#/ratelimit-remaining - ratelimit-reset: - $ref: ../../../shared/headers.yml#/ratelimit-reset diff --git a/openapi/resources/tenants/responses/tenant.yml b/openapi/resources/tenants/responses/tenant.yml deleted file mode 100644 index 6621a75..0000000 --- a/openapi/resources/tenants/responses/tenant.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: A tenant, in JSON format. - -content: - application/json: - schema: - $ref: ../models/tenant.yml - examples: - secret: - $ref: ../examples.yml#/tenant - -headers: - ratelimit-limit: - $ref: ../../../shared/headers.yml#/ratelimit-limit - ratelimit-remaining: - $ref: ../../../shared/headers.yml#/ratelimit-remaining - ratelimit-reset: - $ref: ../../../shared/headers.yml#/ratelimit-reset diff --git a/openapi/shared/models/job.yml b/openapi/shared/models/job.yml new file mode 100644 index 0000000..ea2b49f --- /dev/null +++ b/openapi/shared/models/job.yml @@ -0,0 +1,14 @@ +description: A job model. +type: object +properties: + totalResults: + type: integer + format: int64 + example: 100 + itemsPerPage: + type: integer + example: 10 + startIndex: + type: integer + format: int64 + example: 1 diff --git a/package-lock.json b/package-lock.json index 4b9d3e9..17106d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,17 +8,17 @@ "name": "acme-api", "version": "1.0.0", "dependencies": { - "@redocly/openapi-cli": "1.0.0-beta.50" + "@redocly/openapi-cli": "^1.0.0-beta.73" } }, "node_modules/@redocly/ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-RB6vWO78v6c+SW/3bZh+XZMr4nGdJKAiPGsBALuUZnLuCiQ7aXCT1AuFHqnfS2gyXbEUEj+kw8p4ux8KdAfs3A==", + "version": "8.6.4", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.6.4.tgz", + "integrity": "sha512-y9qNj0//tZtWB2jfXNK3BX18BSBp9zNR7KE7lMysVHwbZtY392OJCjm6Rb/h4UHH2r1AqjNEHFD6bRn+DqU9Mw==", "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -27,11 +27,11 @@ } }, "node_modules/@redocly/openapi-cli": { - "version": "1.0.0-beta.50", - "resolved": "https://registry.npmjs.org/@redocly/openapi-cli/-/openapi-cli-1.0.0-beta.50.tgz", - "integrity": "sha512-AHXdnym4AKwTyPRW0lhcawRgXo51EM36hrkpoeXdmqF0EwK57iMFLuYfZ3uYCEer4gf9Hqo6WmS4/bl3nybukw==", + "version": "1.0.0-beta.73", + "resolved": "https://registry.npmjs.org/@redocly/openapi-cli/-/openapi-cli-1.0.0-beta.73.tgz", + "integrity": "sha512-hX6owM8SgjjAM4eVHDZPJJQU7Sjdc0Ohzo++kaGUjCPVDg8NFUmDhYSnBlaaVKCFr1Sye9ZZX5FBlz6Y3ut7jQ==", "dependencies": { - "@redocly/openapi-core": "^1.0.0-beta.50", + "@redocly/openapi-core": "1.0.0-beta.73", "@types/node": "^14.11.8", "assert-node-version": "^1.0.3", "chokidar": "^3.5.1", @@ -39,7 +39,6 @@ "glob": "^7.1.6", "glob-promise": "^3.4.0", "handlebars": "^4.7.6", - "js-yaml": "^3.14.1", "portfinder": "^1.0.26", "simple-websocket": "^9.0.0", "yargs": "17.0.1" @@ -52,18 +51,19 @@ } }, "node_modules/@redocly/openapi-core": { - "version": "1.0.0-beta.50", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.50.tgz", - "integrity": "sha512-GuXn4IETxpbRd8dlAQDQPtvqOpbMvPMeC/e5mv5MOXkLIznNk4vjiQVe6QSCbZbCHzzpb2+89B6S7asebPm4Rg==", + "version": "1.0.0-beta.73", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.73.tgz", + "integrity": "sha512-1wmKGJp+lvhNFDEfTzjB6QlyEPNyozSiDb4sfr+R97pcGa+6YdSmgItPl5P/21Y0fBZYku9Uo1n0rhFVdr20EQ==", "dependencies": { - "@redocly/ajv": "^6.12.3", + "@redocly/ajv": "^8.6.4", "@types/node": "^14.11.8", "colorette": "^1.2.0", "js-levenshtein": "^1.1.6", - "js-yaml": "^3.14.1", + "js-yaml": "^4.1.0", "lodash.isequal": "^4.5.0", "minimatch": "^3.0.4", "node-fetch": "^2.6.1", + "pluralize": "^8.0.0", "yaml-ast-parser": "0.0.43" }, "engines": { @@ -124,12 +124,9 @@ } }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/assert-node-version": { "version": "1.0.3", @@ -231,9 +228,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" }, "node_modules/concat-map": { "version": "0.0.1", @@ -261,18 +258,6 @@ "node": ">=6" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/expected-node-version": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/expected-node-version/-/expected-node-version-1.0.2.tgz", @@ -286,11 +271,6 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -454,21 +434,20 @@ } }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/lodash": { "version": "4.17.21", @@ -518,9 +497,12 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, "engines": { "node": "4.x || >=6.0.0" } @@ -557,6 +539,14 @@ "node": ">=8.6" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "engines": { + "node": ">=4" + } + }, "node_modules/portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -623,6 +613,14 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -672,11 +670,6 @@ "node": ">=0.10.0" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -720,6 +713,11 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, "node_modules/uglify-js": { "version": "3.13.5", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.5.tgz", @@ -745,6 +743,20 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -820,22 +832,22 @@ }, "dependencies": { "@redocly/ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-RB6vWO78v6c+SW/3bZh+XZMr4nGdJKAiPGsBALuUZnLuCiQ7aXCT1AuFHqnfS2gyXbEUEj+kw8p4ux8KdAfs3A==", + "version": "8.6.4", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.6.4.tgz", + "integrity": "sha512-y9qNj0//tZtWB2jfXNK3BX18BSBp9zNR7KE7lMysVHwbZtY392OJCjm6Rb/h4UHH2r1AqjNEHFD6bRn+DqU9Mw==", "requires": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, "@redocly/openapi-cli": { - "version": "1.0.0-beta.50", - "resolved": "https://registry.npmjs.org/@redocly/openapi-cli/-/openapi-cli-1.0.0-beta.50.tgz", - "integrity": "sha512-AHXdnym4AKwTyPRW0lhcawRgXo51EM36hrkpoeXdmqF0EwK57iMFLuYfZ3uYCEer4gf9Hqo6WmS4/bl3nybukw==", + "version": "1.0.0-beta.73", + "resolved": "https://registry.npmjs.org/@redocly/openapi-cli/-/openapi-cli-1.0.0-beta.73.tgz", + "integrity": "sha512-hX6owM8SgjjAM4eVHDZPJJQU7Sjdc0Ohzo++kaGUjCPVDg8NFUmDhYSnBlaaVKCFr1Sye9ZZX5FBlz6Y3ut7jQ==", "requires": { - "@redocly/openapi-core": "^1.0.0-beta.50", + "@redocly/openapi-core": "1.0.0-beta.73", "@types/node": "^14.11.8", "assert-node-version": "^1.0.3", "chokidar": "^3.5.1", @@ -843,25 +855,25 @@ "glob": "^7.1.6", "glob-promise": "^3.4.0", "handlebars": "^4.7.6", - "js-yaml": "^3.14.1", "portfinder": "^1.0.26", "simple-websocket": "^9.0.0", "yargs": "17.0.1" } }, "@redocly/openapi-core": { - "version": "1.0.0-beta.50", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.50.tgz", - "integrity": "sha512-GuXn4IETxpbRd8dlAQDQPtvqOpbMvPMeC/e5mv5MOXkLIznNk4vjiQVe6QSCbZbCHzzpb2+89B6S7asebPm4Rg==", + "version": "1.0.0-beta.73", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.73.tgz", + "integrity": "sha512-1wmKGJp+lvhNFDEfTzjB6QlyEPNyozSiDb4sfr+R97pcGa+6YdSmgItPl5P/21Y0fBZYku9Uo1n0rhFVdr20EQ==", "requires": { - "@redocly/ajv": "^6.12.3", + "@redocly/ajv": "^8.6.4", "@types/node": "^14.11.8", "colorette": "^1.2.0", "js-levenshtein": "^1.1.6", - "js-yaml": "^3.14.1", + "js-yaml": "^4.1.0", "lodash.isequal": "^4.5.0", "minimatch": "^3.0.4", "node-fetch": "^2.6.1", + "pluralize": "^8.0.0", "yaml-ast-parser": "0.0.43" } }, @@ -907,12 +919,9 @@ } }, "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "assert-node-version": { "version": "1.0.3", @@ -997,9 +1006,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" }, "concat-map": { "version": "0.0.1", @@ -1024,11 +1033,6 @@ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, "expected-node-version": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/expected-node-version/-/expected-node-version-1.0.2.tgz", @@ -1039,11 +1043,6 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1160,18 +1159,17 @@ "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==" }, "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "lodash": { "version": "4.17.21", @@ -1215,9 +1213,12 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "requires": { + "whatwg-url": "^5.0.0" + } }, "normalize-path": { "version": "3.0.0", @@ -1242,6 +1243,11 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==" }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==" + }, "portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -1293,6 +1299,11 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1335,11 +1346,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -1374,6 +1380,11 @@ "is-number": "^7.0.0" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, "uglify-js": { "version": "3.13.5", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.5.tgz", @@ -1393,6 +1404,20 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index 2afa79f..09f1428 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "acme-api", "version": "1.0.0", "dependencies": { - "@redocly/openapi-cli": "1.0.0-beta.50" + "@redocly/openapi-cli": "^1.0.0-beta.73" }, "private": true, "scripts": {