Lexikjwtauthenticationbundle: Support for Nelmio API Doc

Created on 29 Jun 2017  路  4Comments  路  Source: lexik/LexikJWTAuthenticationBundle

Since I am using the auth bundle with swagger..wondering if there is an easy way to get the login route into the api doc? Thanks

Most helpful comment

You can add the route to the paths array under the documentation key:

    documentation:
        paths:
            /api/login_check:
                post:
                    summary: get jwt
                    consumes:
                        - application/json
                    parameters:
                        - in: body
                          name: user
                          description: user credentials
                          schema:
                              type: object
                              required:
                                  - userName
                              properties:
                                  username:
                                      type: string
                                  password:
                                      type: string

All 4 comments

I found it in a closed issue..sorry for spamming..

@JuliusKoronci, I have the same issue, could you share a link to the issue you've found?

@kix I don't remember but you can check my repo..it should be there https://github.com/JuliusKoronci/Symfony-React-CI/tree/master/symfony-app

You can add the route to the paths array under the documentation key:

    documentation:
        paths:
            /api/login_check:
                post:
                    summary: get jwt
                    consumes:
                        - application/json
                    parameters:
                        - in: body
                          name: user
                          description: user credentials
                          schema:
                              type: object
                              required:
                                  - userName
                              properties:
                                  username:
                                      type: string
                                  password:
                                      type: string
Was this page helpful?
0 / 5 - 0 ratings