Has anyone been able to create an OpenAPI 3.0 specification that is able to request a token from Auth0? I am running a local Swagger Editor https://github.com/swagger-api/swagger-editor.
What callback must I register with my Auth0 application? http://localhost:3001/oauth2-redirect.html
openapi: 3.0.0
info:
version: 0.0.1
title: My API
servers:
- url: '{protocol}://localhost:8081/{basePath}'
description: My API locally hosted release
variables:
protocol:
description: Protocol
enum:
- 'https'
- 'http'
default: 'https'
basePath:
description: Base path
enum:
- 'api/v1'
default: 'api/v1'
components:
securitySchemes:
auth0:
type: oauth2
flows:
authorizationCode:
authorizationUrl: 'https://dev-0000-x000.auth0.com/oauth/authorize'
tokenUrl: 'https://dev-0000-x000.auth0.com/oauth/token'
scopes:
{}
security:
- auth0: []
paths:
/companies:
get:
description: Returns a list of companies
responses:
'200':
description: Successful response
@konrad.sopala Any update on this? It’s really hard to make an API without documentation for the Auth section. Would it please be possible to document documentation of Auth0?
Unfortunately I don’t see any progress made on this front. Definitely there is not enough people advocating for this one compared to other feature and product requests that our product team have in their backlog. Sorry for the inconvenience!
Indeed this would be very practical that auth0 provides an updated openapi specification.
I often use such specifications to auto generate api client which saves a lot of times.
I think you don’t have much effort to provide this because you already produces a swagger 1.2 specification.
See: Auth0 Management API v2
Check your browser requests, it actually download swagger 1.2 specifications files.
I was able to convert them to swagger 2.0 specifications files using this tool : API Spec Converter
There is some more manual modifications to be made after that but it already saves time.
If you could produce an updated spec it would be very nice, again seeing how your api documentation page is setup I don’t think it would require much effort to update it to a more recent open api file spec