v2 auth parallel

This commit is contained in:
jableader 2025-11-01 13:44:00 +11:00
parent f1dac94396
commit e714f663bb

View file

@ -1282,16 +1282,16 @@
"/api/v1/auth/login": { "/api/v1/auth/login": {
"post": { "post": {
"tags": [ "tags": [
"v1", "v2",
"auth" "auth-v2"
], ],
"summary": "Login and set user_id cookie", "summary": "Login",
"operationId": "login", "operationId": "loginV2",
"requestBody": { "requestBody": {
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/LoginBody" "$ref": "#/components/schemas/api__auth_v2__LoginBody"
} }
} }
}, },
@ -1303,14 +1303,11 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/Person" "$ref": "#/components/schemas/TokenResponse"
} }
} }
} }
}, },
"404": {
"$ref": "#/components/responses/Problem404"
},
"422": { "422": {
"description": "Validation Error", "description": "Validation Error",
"content": { "content": {
@ -1372,6 +1369,119 @@
] ]
} }
}, },
"/api/v1/auth/register": {
"post": {
"tags": [
"v2",
"auth-v2"
],
"summary": "Register",
"operationId": "register",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/users/me/households": {
"get": {
"tags": [
"v2",
"households"
],
"summary": "List My Households",
"operationId": "list_my_households_api_v1_users_me_households_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/HouseholdResponse"
},
"type": "array",
"title": "Response List My Households Api V1 Users Me Households Get"
}
}
}
},
"422": {
"$ref": "#/components/responses/Problem422"
}
}
}
},
"/api/v1/households": {
"post": {
"tags": [
"v2",
"households"
],
"summary": "Create Household",
"operationId": "create_household_api_v1_households_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateHouseholdBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HouseholdResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/healthz": { "/healthz": {
"get": { "get": {
"summary": "Healthz", "summary": "Healthz",
@ -1393,6 +1503,19 @@
}, },
"components": { "components": {
"schemas": { "schemas": {
"CreateHouseholdBody": {
"properties": {
"name": {
"type": "string",
"title": "Name"
}
},
"type": "object",
"required": [
"name"
],
"title": "CreateHouseholdBody"
},
"CurrentShoppingList": { "CurrentShoppingList": {
"properties": { "properties": {
"outstandingItems": { "outstandingItems": {
@ -1484,6 +1607,29 @@
"type": "object", "type": "object",
"title": "HealthStatus" "title": "HealthStatus"
}, },
"HouseholdResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name"
},
"slug": {
"type": "string",
"title": "Slug"
}
},
"type": "object",
"required": [
"id",
"name",
"slug"
],
"title": "HouseholdResponse"
},
"Ingredient": { "Ingredient": {
"properties": { "properties": {
"id": { "id": {
@ -1706,19 +1852,6 @@
], ],
"title": "ListIngredientItem" "title": "ListIngredientItem"
}, },
"LoginBody": {
"properties": {
"username": {
"type": "string",
"title": "Username"
}
},
"type": "object",
"required": [
"username"
],
"title": "LoginBody"
},
"Meal-Input": { "Meal-Input": {
"properties": { "properties": {
"id": { "id": {
@ -2669,6 +2802,29 @@
], ],
"title": "RecipeOut" "title": "RecipeOut"
}, },
"RegisterBody": {
"properties": {
"email": {
"type": "string",
"title": "Email"
},
"password": {
"type": "string",
"title": "Password"
},
"displayName": {
"type": "string",
"title": "Displayname"
}
},
"type": "object",
"required": [
"email",
"password",
"displayName"
],
"title": "RegisterBody"
},
"RequestedMealItem": { "RequestedMealItem": {
"properties": { "properties": {
"kind": { "kind": {
@ -2769,6 +2925,62 @@
], ],
"title": "StoreEnum" "title": "StoreEnum"
}, },
"TokenResponse": {
"properties": {
"accessToken": {
"type": "string",
"title": "Accesstoken"
},
"tokenType": {
"type": "string",
"title": "Tokentype",
"default": "bearer"
},
"user": {
"$ref": "#/components/schemas/User"
}
},
"type": "object",
"required": [
"accessToken",
"user"
],
"title": "TokenResponse"
},
"User": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"email": {
"type": "string",
"title": "Email"
},
"displayName": {
"type": "string",
"title": "Displayname"
},
"profilePhotoUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Profilephotourl"
}
},
"type": "object",
"required": [
"email",
"displayName"
],
"title": "User"
},
"ValidationError": { "ValidationError": {
"properties": { "properties": {
"loc": { "loc": {
@ -2802,6 +3014,37 @@
], ],
"title": "ValidationError" "title": "ValidationError"
}, },
"api__auth__LoginBody": {
"properties": {
"username": {
"type": "string",
"title": "Username"
}
},
"type": "object",
"required": [
"username"
],
"title": "LoginBody"
},
"api__auth_v2__LoginBody": {
"properties": {
"email": {
"type": "string",
"title": "Email"
},
"password": {
"type": "string",
"title": "Password"
}
},
"type": "object",
"required": [
"email",
"password"
],
"title": "LoginBody"
},
"StoreNameOut": { "StoreNameOut": {
"type": "string", "type": "string",
"enum": [ "enum": [