Redocly / developer-portal-starter

Starter template for the Redocly developer portal
https://redoc.ly
Other
64 stars 101 forks source link

user confused by multiple "components" dirs with different functions #104

Closed WaterSibilantFalling closed 2 years ago

WaterSibilantFalling commented 2 years ago

create-openapi-repo makes the structure:

./
    openapi/
         components/ 
         paths/
         openapi.yaml

the developer-portal-starter has the strucure

./
    components/
    openapi/
         paths/
         openapi.yaml

So, the relative inter-directory relationships between file paths in the paths files and in the component files are also different.

Great fun when coming to a project built from the developer-portal and wanting to add an API split up by create-openapi-repo.

Are Redocly's tools meant to be internally inconsistent?

RomanHotsiy commented 2 years ago

component in the developer-portal starter are interactive React components used in MDX pages, not openapi components.

This is just a coincidence in names, we'll see how to fix that.

Meanwhile, you can still put create-openapi-repo API in a split form to the developer portal. It will work just fine, e.g.:

./
    components/ # -- react components here
    openapi/ 
         paths/
         components/ # -- openapi components here
         openapi.yaml

Does it make sense? Let me know if you need further help.

WaterSibilantFalling commented 2 years ago

Does it make sense?

Yes, it does. Thanks. I must have had a different problem after moving the dir tree (that I incorrectly thought was this).

The two-same-named-dirs-with-completely-different-functions is bad though.

we'll see how to fix that.

Yeah. good that. I'll rename this ticket ("user confused by multiple "components" dirs" or s.t.) and close it. Thanks for your response.