Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdocsoad: Failed to read source #65

Open
LuisHPorras opened this issue Aug 17, 2024 · 1 comment
Open

mkdocsoad: Failed to read source #65

LuisHPorras opened this issue Aug 17, 2024 · 1 comment

Comments

@LuisHPorras
Copy link

First of all, thanks a lot for your work, looks great and I'm willing to be able to test it and make use of it!

Problem

I'm just trying to make use of the plugin but I'm not able to do it. I'm following the docs, install the dependencies, configure the mkdocs.yml:

# ... some config

nav:
    - Inicio: index.md
    - 'Hoja de ruta': roadmap.md
    - Cliente: 
        - Inicio: client/index.md
    - Servidor: 
        - Inicio: server/index.md
        - API: server/api.md
    - 'Meta-documentación': metadocs.md

# ... more config

plugins:
    - search
    - git-revision-date
    - neoteroi.mkdocsoad:
        use_pymdownx: true

markdown_extensions:
    - admonition
    - pymdownx.details
    - pymdownx.superfences
    - pymdownx.tabbed:
        alternate_style: true
    - toc:
          permalink: true

Create the new entry in the docs ./server/api.md:

# __API__

[OAD(./openapi.yaml)]

Provide the openapi generated json file in the samse directory. And I get the following error when launching mkdocs serve:

ValueError: Invalid source: it must be either a path to .json or a .yaml file, or a valid URL. 

I'm using Swagger editor to validate the openapi file and it doesn't contain errors. You can find the code at PROECOS branch 19-documentation

I haven't found much information for troubleshooting in the docs, I'll be willing to PR with updated docs if we get to find the solution.

Cheers!

@mscheerschmidt-mhp
Copy link

I've got the same issue, not including [OAD(./openapi.json)] in the md file makes mkdocs build succeed. Having it included fails with noted error.

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

No branches or pull requests

2 participants