nelmio_api_doc:
    areas:
        path_patterns: # an array of regexps (document only routes under /api, except /api/doc)
            - ^/api(?!/doc$)
    documentation:
        default_sections_opened:  false

        info:
            title: Sales CRM
            description: This is an awesome app!
            version: 1.0.0
        components:
            securitySchemes:
                Bearer:
                    type: http
                    scheme: bearer
                    bearerFormat: JWT
        security:
            - Bearer: []
            - ^/api(?!/doc/$) # Accepts routes under /api except /api/doc
        paths:
            /api/login_check:
                post:
                    tags:
                        - Login
                    summary: Login
                    requestBody:
                        content:
                            application/json:
                                schema:
                                    properties:
                                        username:
                                            type: string
                                        password:
                                            type: string
                                    type: object
                    responses:
                        '200':
                            description: OK
                            content:
                                application/json:
                                    schema:
                                        type: object
                                        properties:
                                            token:
                                                type: string
                                            refresh_token:
                                                type: string
                        '401':
                            description: Invalid credentials
                        '400':
                            description: Invalid JSON.
                    security: []
                        
            /api/token/refresh:
                post:
                    tags:
                        - Login
                    summary: Refresh token
                    requestBody:
                        content:
                            application/json:
                                schema:
                                    properties:
                                        refresh_token:
                                            type: string
                                    type: object
                    responses:
                        '200':
                            description: OK
                            content:
                                application/json:
                                    schema:
                                        type: object
                                        properties:
                                            token:
                                                type: string
                                            refresh_token:
                                                type: string
                        '401':
                            description: An authentication exception occurred.
                    security: []