Skip to content

Conversation

@Demacri
Copy link

@Demacri Demacri commented Sep 24, 2023

What does it do?

Add the ability to generate openapi paths for custom routes using @strapi/plugin-documentation.

How to test it?

  1. Install strapi plugin-documentation
  2. Add custom routes to your content-types in strapi.
    Example:
    src/api/myEntity/routes/my-custom-routes.ts
    src/api/myEntity/routes/myEntity.ts
  3. npm run develop

Without this fix, the generated src\extensions\documentation\documentation\1.0.0\full_documentation.json will only include paths defined in src/api/myEntity/routes/myEntity.ts.

Related issue(s)/PR(s)

Fix #844 .

@strapi-cla
Copy link

strapi-cla commented Sep 24, 2023

CLA assistant check
All committers have signed the CLA.

@Boegie19
Copy link
Collaborator

@Demacri Please sign the CLA. since if you don't this can't be merged by the strapi team.

@Demacri
Copy link
Author

Demacri commented Sep 24, 2023

@Demacri Please sign the CLA. since if you don't this can't be merged by the strapi team.

Yes, i did... i'm trying to understand why it's not recognizing it

image

@Boegie19
Copy link
Collaborator

Boegie19 commented Sep 24, 2023

@Demacri Please sign the CLA. since if you don't this can't be merged by the strapi team.

Yes, i did... i'm trying to understand why it's not recognizing it

image

I can answer that question the commit was done by a none GitHub account with the name Alessandro Capezzera
so most likley a git miss configuration so you need to reset your branch and try again.

@Demacri
Copy link
Author

Demacri commented Sep 24, 2023

Thank you @Boegie19 . Email misconfig in local environment 😁 ✌️

@markkaylor markkaylor self-assigned this Sep 25, 2023
@Kricket
Copy link

Kricket commented Mar 13, 2024

Any chance of this being merged? It's been waiting for 6 months now...

@markkaylor markkaylor self-requested a review March 13, 2024 15:39
@hirwaaldo1
Copy link

hirwaaldo1 commented Mar 20, 2024

Hello @Demacri, When I try to use the collection type of Rich text (Blocks) the plugin does not work; it throws this error.

Error: Invalid type blocks while generating open api schema.  

If you know how to fix it, it will be great.
Thanks !!

@Demacri
Copy link
Author

Demacri commented Mar 21, 2024

Hello @Demacri, When I try to use the collection type of Rich text (Blocks) the plugin does not work; it throws this error.

Error: Invalid type blocks while generating open api schema.  

If you know how to fix it, it will be great. Thanks !!

Hi, it's been a while since this fix but i'll try to help you.
I can't reproduce the issue in my local env in 4.6.2 strapi version.
Can you provide a small repo with the issue and the steps to reproduce it, please?

@nextlevelshit
Copy link

@Demacri @Boegie19 Any progress on that topic?

@Demacri
Copy link
Author

Demacri commented Jun 6, 2024

@Demacri @Boegie19 Any progress on that topic?

Sorry, I'm not using strapi anymore. Unfortunately, this PR was never reviewed and merged.

@hanpaine hanpaine removed the request for review from markkaylor August 1, 2024 10:46
@hanpaine hanpaine added pr: fix This PR is fixing a bug community Changes and fixes created by community members source: plugin:documentation Source is plugin/documentation package labels Aug 1, 2024
@pinkasey
Copy link

@Boegie19
Is there a chance for this issue to ever be fixed?
@Demacri has fixed it for you almost a year ago. All you need to do is merge.
(well now you need to rebase and resolve conflicts, since you lingered so long)

Honestly, I don't understand why some companies won't accept free labor for the products the serve to their paying customers...

@strapi-bot
Copy link

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/solution-add-custom-routes-in-swagger-and-change-swagger-settings-based-on-swagger-with-strapi-4-default-overwrite/34408/3

@alexandrebodin
Copy link
Member

Important

With the release of Strapi 5, we have lifted the code freeze. To ensure we can effectively review and assist with contributions, we are now only accepting PRs targeting version 5 (the develop branch).

As your PR targets version 4, it has been automatically closed. However, we would greatly appreciate it if you could update your contribution to align with version 5 and resubmit!

@pinkasey

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Changes and fixes created by community members pr: fix This PR is fixing a bug source: plugin:documentation Source is plugin/documentation package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Documentation for custom routes [documentation plugin]