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

Failed to Create Session #41

Closed
llorcasantana opened this issue Mar 31, 2022 · 1 comment
Closed

Failed to Create Session #41

llorcasantana opened this issue Mar 31, 2022 · 1 comment

Comments

@llorcasantana
Copy link

Hello,

Im trying to load my Laravel swagger doc and return "Could not determine content type"

{
    "openapi": "3.0.0",
    "info": {
        "title": "Documentation APIRest for sea and ports",
        "version": "1.0.0"
    },
    "paths": {
        "/api/auth/login": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Sign in",
                "description": "Login by email, password",
                "operationId": "authLogin",
                "requestBody": {
                    "description": "Pass user credentials",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email",
                                    "password"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "admin@demo.com"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "demo"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "422": {
                        "description": "Wrong credentials response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Sorry, wrong email address or password. Please try again"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/auth/me": {
            "get": {
                "tags": [
                    "Auth"
                ],
                "summary": "user info login",
                "description": "Get the authenticated User.",
                "operationId": "authMe",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        },
        "/api/auth/logout": {
            "get": {
                "tags": [
                    "Auth"
                ],
                "summary": "logout from app",
                "description": "Log the user out (Invalidate the token).",
                "operationId": "authLogout",
                "responses": {
                    "200": {
                        "description": "Logout from the app",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        },
        "/api/auth/refresh": {
            "get": {
                "tags": [
                    "Auth"
                ],
                "summary": "Refresh token",
                "description": "Refresh a token.",
                "operationId": "authRefresh",
                "responses": {
                    "200": {
                        "description": "Refresh token",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        },
        "/api/resource/{model}": {
            "get": {
                "tags": [
                    "Resources"
                ],
                "summary": "resource to prints in selects or forms",
                "description": "Get id or name of models  master to create objects or add relationships in user to assignment.",
                "operationId": "getAllIdAndNamesOfModel",
                "parameters": [
                    {
                        "name": "model",
                        "in": "path",
                        "description": "name resource to get data (Only plural)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "office"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Get id and name of resource",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "apiAuth": {
                "type": "http",
                "description": "Login with email and password to get the authentication token",
                "name": "Token based Based",
                "in": "header",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            }
        }
    },
    "security": [
        []
    ]
}
@SvenEV
Copy link
Owner

SvenEV commented Mar 31, 2022

Hi, I'm sorry to inform you that WinSwag does not support OpenAPI 3.x documents, only OpenAPI 2.x (see #23).

That said, I have not been maintaining this project for years and I am not planning to continue working on it. I'm going to archive this repository so that this becomes clear. Thanks for giving it a try though!

@SvenEV SvenEV closed this as completed Mar 31, 2022
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