diff --git a/openapi/index.yaml b/openapi/index.yaml index 51893a3..d051d6b 100644 --- a/openapi/index.yaml +++ b/openapi/index.yaml @@ -257,10 +257,6 @@ paths: $ref: paths/utils/cache/clear/index.yaml "/utils/export/{collection}": $ref: paths/utils/export/_collection/index.yaml - "/utils/hash/generate": - $ref: paths/utils/hash/generate/index.yaml - "/utils/hash/verify": - $ref: paths/utils/hash/verify/index.yaml "/utils/import/{collection}": $ref: paths/utils/import/_collection/index.yaml "/utils/random/string": diff --git a/openapi/paths/utils/hash/generate/hash-generate.yaml b/openapi/paths/utils/hash/generate/hash-generate.yaml deleted file mode 100644 index d2c1844..0000000 --- a/openapi/paths/utils/hash/generate/hash-generate.yaml +++ /dev/null @@ -1,48 +0,0 @@ -summary: Generate a Hash -description: Generate a hash for a given string. -operationId: hash-generate -requestBody: - content: - application/json: - schema: - type: object - properties: - string: - type: string - description: String to hash. - required: - - string -responses: - '200': - content: - application/json: - schema: - type: object - properties: - data: - type: string - example: - $argon2i$v=19$m=4096,t=3,p=1$pOyIa/zmRAjCVLb2f7kOyg$DasoO6LzMM+6iKfzCDq6JbsYsZWLSm33p7i9NxL9mDc - description: Successful request - '400': - $ref: ../../../../components/responses.yaml#/BadRequestError -security: [] -tags: -- Utilities -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, generateHash } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(generateHash(string_to_hash)); - - label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - utils_hash_generate(string: String!): String - } diff --git a/openapi/paths/utils/hash/generate/index.yaml b/openapi/paths/utils/hash/generate/index.yaml deleted file mode 100644 index 43c816f..0000000 --- a/openapi/paths/utils/hash/generate/index.yaml +++ /dev/null @@ -1,2 +0,0 @@ -post: - $ref: hash-generate.yaml diff --git a/openapi/paths/utils/hash/verify/hash-verify.yaml b/openapi/paths/utils/hash/verify/hash-verify.yaml deleted file mode 100644 index 22cac03..0000000 --- a/openapi/paths/utils/hash/verify/hash-verify.yaml +++ /dev/null @@ -1,51 +0,0 @@ -summary: Verify a Hash -description: Verify a string with a hash. -operationId: hash-verify -requestBody: - content: - application/json: - schema: - type: object - properties: - string: - type: string - description: String to hash. - hash: - type: string - description: Hash you want to verify against. - required: - - string - - hash -responses: - '200': - content: - application/json: - schema: - type: object - properties: - data: - type: boolean - example: true - description: Successful request - '400': - $ref: ../../../../components/responses.yaml#/BadRequestError -security: [] -tags: -- Utilities -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, verifyHash } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(verifyHash(string_to_verify, hash)); - - label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - utils_hash_verify(hash: String!, string: String!): Boolean - } diff --git a/openapi/paths/utils/hash/verify/index.yaml b/openapi/paths/utils/hash/verify/index.yaml deleted file mode 100644 index f3b4e0d..0000000 --- a/openapi/paths/utils/hash/verify/index.yaml +++ /dev/null @@ -1,2 +0,0 @@ -post: - $ref: hash-verify.yaml