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

Put examples with the port #832

Open
ghost opened this issue Dec 15, 2019 · 2 comments
Open

Put examples with the port #832

ghost opened this issue Dec 15, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 15, 2019

I have this method:

@hug.get('/documents/list')
def llista():
    """Returns whole list of documents"""
    docs = [lib.Doc(doc).HeaderstoJSON for doc in glob.iglob('./*.md')]
    return {'documents': docs}

and http://localhost:8000 returns me:

"documentation": {
        "handlers": {
            "/documents/list": {
                "GET": {
                    "usage": "Returns whole list of documents",
                    "examples": [
                        "http://localhost/documents/list"
                    ],
                    "outputs": {
                        "format": "JSON (Javascript Serialized Object Notation)",
                        "content_type": "application/json; charset=utf-8"
                    }
                }
            },

but really the autogenerated documentation should say the port:

                        "http://localhost:8000/documents/list"
                    ],```
@zor-el
Copy link

zor-el commented Jun 1, 2020

I second this, especially as there is no obvious workaround. @jay-tyler I wouldn't say it's an enhancement, but clearly a bug. Ports are inherent to the API/server functionality, and so should be honored consistently throughout the code.

@zor-el
Copy link

zor-el commented Jun 1, 2020

Just discovered PR #842 already fixes this issue 👍

Can we expect it to be merge soon?

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

No branches or pull requests

2 participants