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

curl examples don't work because of missing '--negotiate -u :' #309

Open
kparal opened this issue Feb 11, 2022 · 1 comment
Open

curl examples don't work because of missing '--negotiate -u :' #309

kparal opened this issue Feb 11, 2022 · 1 comment

Comments

@kparal
Copy link

kparal commented Feb 11, 2022

Looking at https://fasjson.fedoraproject.org/docs/v1/ the examples worked for me in a browser, but didn't work on the command line:

$ curl -X 'GET'   'https://fasjson.fedoraproject.org/v1/me/'   -H 'accept: application/json'
{"message": "The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."}

It took me some time to figure out why. The other documentation makes it clear that those curl commands need to include --negotiate -u : :

$ curl --negotiate -u : -X 'GET'   'https://fasjson.fedoraproject.org/v1/me/'   -H 'accept: application/json'
{"result": {"dn": "uid=kparal,cn=users,cn=accounts,dc=fedoraproject,dc=org", "username": "kparal", "service": null, "uri": "https://fasjson.fedoraproject.org/v1/users/kparal/"}}

Please fix the documentation to include those args, thank you.

@abompard
Copy link
Member

abompard commented Mar 1, 2022

It's unfortunately impossible to do at the moment. This documentation is auto-generated by Swagger, and the configuration option required to change the example curl command is not available through the flask-restx library we use. I've opened a ticket on flask-restx for this feature request.

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