Skip to content

Conversation

@connorwinston
Copy link
Member

No description provided.

@netlify
Copy link

netlify bot commented Sep 20, 2024

Deploy Preview for directus-docs-v2 failed. Why did it fail? →

Name Link
🔨 Latest commit 1ed52cb
🔍 Latest deploy log https://app.netlify.com/sites/directus-docs-v2/deploys/67601c16fa01720008aa9db6

@phazonoverload phazonoverload changed the title OAS New OpenAPI Spec Sep 23, 2024
…ing references and appending GraphQL and SDK snippets
@bevis-hp
Copy link

bevis-hp commented Oct 6, 2024

@phazonoverload I have completed converting the json endpoints from the generated oas to the paths folder.
There were a few fully issues I came across stopping me 100% the task due to primarily name changes and changes from the old docs or these could not be issues.
If you answer these questions I can polish it off.

  • GraphQL snippet for 'Update a comment' in old docs is delete_comment? I assume that's a mistake, What is the correct name?
  • Is there getAsset SDK&GQL snippet?
  • 'List Auth Providers' (oauth) has no GraphQL example, is that correct?
  • Is there 'Authenticated using an OAuth provider' (oauthProvider) SDK&GQL snippet? Is it the old 'Login Using SSO Providers' snippet?
  • Is there 'updateExtensionBundle' SDK&GQL snippet?
  • Is 'createFile' the new verison of 'importFile' or 'uploadFile'?
  • Is there a 'createOperations' can only find 'createOperation' in json? Old docs reference both, have included the snippets for the 'createOperations' as the requestBody suggests it takes an array.
  • No Policies endpoints, cant find in the json?
  • Is 'getMyPermissions' the new 'getUserPermissions'?
  • 'schemaApply' doesn't have a generic request example, on a use example as is hard to make generic, what do you want to do here?
  • Does 'updateLastUsedPageMe' need a SDK&GQL snipper, cant find any in old docs.
  • Is 'Invite' under /user/invite/ the new 'registerUser' or the new 'inviteUser'? the request gives no hints to what SDK&GQL snippets needed.
  • All of the utils rest enpoints have different names to the SDK and GQL, don't know if this is an issue.

Copy link
Contributor

@hola-soy-milk hola-soy-milk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much! I just left the below comment that's blocking me from a straightforward review. Could you please take a look?

Comment on lines +15 to 16
$ref: paths/permissions/index.yaml
"/permissions/{id}":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just spoke about this with @phazonoverload, is it possible the other paths got removed or not added? Right now I'm only seeing permissions

Copy link
Contributor

@hola-soy-milk hola-soy-milk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding these! I'm afraid I can't get the docs to run now.

Please can you take a look at my comment

$ref: paths/users/me/tfa/enable/index.yaml
"/users/me/track/page":
$ref: paths/users/me/track/page/index.yaml
"/utils/cache/clear"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid there's a : missing in this and the next few, giving me this error:

bundling ./api-spec/index.yaml...
Failed to parse API description at ./api-spec/index.yaml:

  - can not read an implicit mapping pair; a colon is missed in "/Users/carmenh/directus/docs/api-spec/index.yaml" (122:23)

 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

Adding them then generates a bunch of errors:

[27] api-spec/paths/webhooks/_id/updateWebhook.yaml:53:5 at #/responses/404
                                                                                                                                                                  
Can't resolve $ref: ENOENT: no such file or directory '/Users/carmenh/directus/docs/api-spec/paths/components/responses.yaml'
                                                                                                                                                                  
51 |     $ref: ../../components/responses.yaml#/UnauthorizedError
52 |   '404':
53 |     $ref: ../../components/responses.yaml#/NotFoundError
54 | tags:
55 | - Webhooks
                                                                                                                                                                  
Error was generated by the bundler rule.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies. Very silly of me. Added them now.

@netlify
Copy link

netlify bot commented Oct 29, 2024

Deploy Preview for directus-docs-rewrite failed. Why did it fail? →

Name Link
🔨 Latest commit 1ed52cb
🔍 Latest deploy log https://app.netlify.com/sites/directus-docs-rewrite/deploys/67601c16cf05500008433c2c

Copy link
Contributor

@hola-soy-milk hola-soy-milk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this!

I've left a number of wording and formatting suggestions that I'm happy to handle myself.

I've also left a number of questions/requests. There's a number of endpoints and code snippets missing from the current documentation.

On a broader note:

  • Is it possible to embed vue components into this?
  • There is an inconsistent use of an example directus URL and a directus_url variable in code snippets. Can we make this consistent?
  • In a few request body breakdowns, we show this ANYOF type. What is it? Can we add an explanation to it? See screenshot below.
    Thanks in advance!

image

@phazonoverload phazonoverload merged commit 442383f into main Dec 16, 2024
0 of 3 checks passed
@phazonoverload phazonoverload deleted the oas-fixed branch December 16, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants