🚧 Changed api generation tool

Signed-off-by: Pau Costa <mico@micodev.es>
pull/2/head
Pau Costa Ferrer 2024-02-07 17:38:59 +01:00
parent ec01ee98b2
commit d2f42d397f
22 changed files with 2285 additions and 5546 deletions

View File

@ -1,11 +0,0 @@
{
"version": "1.0",
"apis": [
{
"identifier": "devspace",
"source": "../DevSpaceOApi.json",
"integrity": "sha512-ZenepSHe2uzlizeb4kIdt/ifcmSRCqqyUp8UDuK4aveYeckooMss3ijWyGeem77CRSAspaOPx8uvlxGWJ805jw==",
"installerVersion": "6.1.1"
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
{
"name": "@api/devspace",
"version": "0.1.0",
"main": "./index.ts",
"types": "./index.d.ts",
"resolveJsonModule": true,
"dependencies": {
"api": "^6.1.1",
"json-schema-to-ts": "^2.8.0-beta.0",
"oas": "^20.10.3"
}
}

View File

@ -1,35 +0,0 @@
const CommentPost = {"body":{"type":"object","properties":{"content":{"type":"string","description":"Comment content"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the post"}},"required":["id"]}]},"response":{"201":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const CreatePost = {"body":{"type":"object","properties":{"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"}},"$schema":"http://json-schema.org/draft-04/schema#"},"response":{"201":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const DeletePost = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the post"}},"required":["id"]}]}} as const
;
const DeleteUsersIdFollow = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","description":"The ID of the user to unfollow","$schema":"http://json-schema.org/draft-04/schema#"}},"required":["id"]}]},"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}},"followed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const GetAllPosts = {"response":{"200":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const GetAuthLogout = {"response":{"200":{"type":"object","properties":{"status":{"type":"string","examples":["success"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const GetFollowedPosts = {"response":{"200":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const GetPost = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the post"}},"required":["id"]}]},"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const GetUsers = {"response":{"200":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const GetUsersId = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the user"}},"required":["id"]}]},"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}},"followed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const GetUsersMe = {"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}},"followed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const LikePost = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the post"}},"required":["id"]}]},"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const PostAuthLogin = {"body":{"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"password":{"type":"string","description":"The password of the user"},"longExpiration":{"type":"boolean","description":"Whether to keep the user logged in for a long time"}},"$schema":"http://json-schema.org/draft-04/schema#"},"response":{"200":{"type":"object","properties":{"status":{"type":"string","examples":["success"]},"token":{"type":"string","description":"The JWT token for the user"}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const PostAuthSignup = {"body":{"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"password":{"type":"string","description":"The password of the user"},"passwordValidation":{"type":"string","description":"Password validation field"},"firstName":{"type":"string","description":"The first name of the user"},"lastName":{"type":"string","description":"The last name of the user"}},"$schema":"http://json-schema.org/draft-04/schema#"},"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const PostUsersIdFollow = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","description":"The ID of the user to follow","$schema":"http://json-schema.org/draft-04/schema#"}},"required":["id"]}]},"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}},"followed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const UnlikePost = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the post"}},"required":["id"]}]},"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
const UpdatePost = {"body":{"type":"object","properties":{"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the post"}},"required":["id"]}]},"response":{"200":{"type":"object","properties":{"id":{"type":"integer","description":"Post ID"},"title":{"type":"string","description":"Post title"},"content":{"type":"string","description":"Post content"},"createdAt":{"type":"string","description":"Post creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Comment ID"},"content":{"type":"string","description":"Comment content"},"createdAt":{"type":"string","description":"Comment creation date"},"createdBy":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}},"likedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"}}}}}}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const
;
export { CommentPost, CreatePost, DeletePost, DeleteUsersIdFollow, GetAllPosts, GetAuthLogout, GetFollowedPosts, GetPost, GetUsers, GetUsersId, GetUsersMe, LikePost, PostAuthLogin, PostAuthSignup, PostUsersIdFollow, UnlikePost, UpdatePost }

View File

@ -1,33 +0,0 @@
import type { FromSchema } from 'json-schema-to-ts';
import * as schemas from './schemas';
export type CommentPostBodyParam = FromSchema<typeof schemas.CommentPost.body>;
export type CommentPostMetadataParam = FromSchema<typeof schemas.CommentPost.metadata>;
export type CommentPostResponse201 = FromSchema<typeof schemas.CommentPost.response['201']>;
export type CreatePostBodyParam = FromSchema<typeof schemas.CreatePost.body>;
export type CreatePostResponse201 = FromSchema<typeof schemas.CreatePost.response['201']>;
export type DeletePostMetadataParam = FromSchema<typeof schemas.DeletePost.metadata>;
export type DeleteUsersIdFollowMetadataParam = FromSchema<typeof schemas.DeleteUsersIdFollow.metadata>;
export type DeleteUsersIdFollowResponse200 = FromSchema<typeof schemas.DeleteUsersIdFollow.response['200']>;
export type GetAllPostsResponse200 = FromSchema<typeof schemas.GetAllPosts.response['200']>;
export type GetAuthLogoutResponse200 = FromSchema<typeof schemas.GetAuthLogout.response['200']>;
export type GetFollowedPostsResponse200 = FromSchema<typeof schemas.GetFollowedPosts.response['200']>;
export type GetPostMetadataParam = FromSchema<typeof schemas.GetPost.metadata>;
export type GetPostResponse200 = FromSchema<typeof schemas.GetPost.response['200']>;
export type GetUsersIdMetadataParam = FromSchema<typeof schemas.GetUsersId.metadata>;
export type GetUsersIdResponse200 = FromSchema<typeof schemas.GetUsersId.response['200']>;
export type GetUsersMeResponse200 = FromSchema<typeof schemas.GetUsersMe.response['200']>;
export type GetUsersResponse200 = FromSchema<typeof schemas.GetUsers.response['200']>;
export type LikePostMetadataParam = FromSchema<typeof schemas.LikePost.metadata>;
export type LikePostResponse200 = FromSchema<typeof schemas.LikePost.response['200']>;
export type PostAuthLoginBodyParam = FromSchema<typeof schemas.PostAuthLogin.body>;
export type PostAuthLoginResponse200 = FromSchema<typeof schemas.PostAuthLogin.response['200']>;
export type PostAuthSignupBodyParam = FromSchema<typeof schemas.PostAuthSignup.body>;
export type PostAuthSignupResponse200 = FromSchema<typeof schemas.PostAuthSignup.response['200']>;
export type PostUsersIdFollowMetadataParam = FromSchema<typeof schemas.PostUsersIdFollow.metadata>;
export type PostUsersIdFollowResponse200 = FromSchema<typeof schemas.PostUsersIdFollow.response['200']>;
export type UnlikePostMetadataParam = FromSchema<typeof schemas.UnlikePost.metadata>;
export type UnlikePostResponse200 = FromSchema<typeof schemas.UnlikePost.response['200']>;
export type UpdatePostBodyParam = FromSchema<typeof schemas.UpdatePost.body>;
export type UpdatePostMetadataParam = FromSchema<typeof schemas.UpdatePost.metadata>;
export type UpdatePostResponse200 = FromSchema<typeof schemas.UpdatePost.response['200']>;

130
client/package-lock.json generated
View File

@ -14,16 +14,20 @@
"@fontsource/roboto": "^5.0.8",
"@mui/icons-material": "^5.15.7",
"@mui/material": "^5.15.7",
"@reduxjs/toolkit": "^2.1.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/axios": "^0.14.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.77",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"axios": "^1.6.7",
"match-sorter": "^6.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^9.1.0",
"react-router-dom": "^6.22.0",
"react-scripts": "5.0.1",
"sort-by": "^1.2.0",
@ -4088,6 +4092,38 @@
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/@reduxjs/toolkit": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.1.0.tgz",
"integrity": "sha512-nfJ/b4ZhzUevQ1ZPKjlDL6CMYxO4o7ZL7OSsvSOxzT/EN11LsBDgTqP7aedHtBrFSVoK7oTP1SbMWUwGb30NLg==",
"dependencies": {
"immer": "^10.0.3",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"reselect": "^5.0.1"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18",
"react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0"
},
"peerDependenciesMeta": {
"react": {
"optional": true
},
"react-redux": {
"optional": true
}
}
},
"node_modules/@reduxjs/toolkit/node_modules/immer": {
"version": "10.0.3",
"resolved": "https://registry.npmjs.org/immer/-/immer-10.0.3.tgz",
"integrity": "sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/immer"
}
},
"node_modules/@remix-run/router": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.0.tgz",
@ -4778,6 +4814,15 @@
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
"integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw=="
},
"node_modules/@types/axios": {
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/@types/axios/-/axios-0.14.0.tgz",
"integrity": "sha512-KqQnQbdYE54D7oa/UmYVMZKq7CO4l8DEENzOKc4aBRwxCXSlJXGz83flFx5L7AWrOQnmuN3kVsRdt+GZPPjiVQ==",
"deprecated": "This is a stub types definition for axios (https://github.com/mzabriskie/axios). axios provides its own type definitions, so you don't need @types/axios installed!",
"dependencies": {
"axios": "*"
}
},
"node_modules/@types/babel__core": {
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
@ -5115,6 +5160,11 @@
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="
},
"node_modules/@types/use-sync-external-store": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz",
"integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA=="
},
"node_modules/@types/ws": {
"version": "8.5.10",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz",
@ -6119,6 +6169,29 @@
"node": ">=4"
}
},
"node_modules/axios": {
"version": "1.6.7",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz",
"integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==",
"dependencies": {
"follow-redirects": "^1.15.4",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/axios/node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/axobject-query": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
@ -16304,6 +16377,11 @@
"node": ">= 0.10"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"node_modules/psl": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
@ -16600,6 +16678,32 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
},
"node_modules/react-redux": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.0.tgz",
"integrity": "sha512-6qoDzIO+gbrza8h3hjMA9aq4nwVFCKFtY2iLxCtVT38Swyy2C/dJCGBXHeHLtx6qlg/8qzc2MrhOeduf5K32wQ==",
"dependencies": {
"@types/use-sync-external-store": "^0.0.3",
"use-sync-external-store": "^1.0.0"
},
"peerDependencies": {
"@types/react": "^18.2.25",
"react": "^18.0",
"react-native": ">=0.69",
"redux": "^5.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"react-native": {
"optional": true
},
"redux": {
"optional": true
}
}
},
"node_modules/react-refresh": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
@ -16780,6 +16884,19 @@
"node": ">=8"
}
},
"node_modules/redux": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
"integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w=="
},
"node_modules/redux-thunk": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz",
"integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==",
"peerDependencies": {
"redux": "^5.0.0"
}
},
"node_modules/reflect.getprototypeof": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz",
@ -16946,6 +17063,11 @@
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
},
"node_modules/reselect": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.0.tgz",
"integrity": "sha512-aw7jcGLDpSgNDyWBQLv2cedml85qd95/iszJjN988zX1t7AVRJi19d9kto5+W7oCfQ94gyo40dVbT6g2k4/kXg=="
},
"node_modules/resolve": {
"version": "1.22.8",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
@ -19049,6 +19171,14 @@
"requires-port": "^1.0.0"
}
},
"node_modules/use-sync-external-store": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz",
"integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==",
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",

View File

@ -3,28 +3,33 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@api/devspace": "file:.api/apis/devspace",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@fontsource/roboto": "^5.0.8",
"@mui/icons-material": "^5.15.7",
"@mui/material": "^5.15.7",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.77",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@reduxjs/toolkit": "^2.1.0",
"axios": "^1.6.7",
"match-sorter": "^6.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^9.1.0",
"react-router-dom": "^6.22.0",
"react-scripts": "5.0.1",
"sort-by": "^1.2.0",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/axios": "^0.14.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.77",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",

4
client/src/api/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist

View File

@ -0,0 +1 @@
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm

View File

@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@ -0,0 +1,9 @@
.gitignore
.npmignore
.openapi-generator-ignore
api.ts
base.ts
common.ts
configuration.ts
git_push.sh
index.ts

View File

@ -0,0 +1 @@
7.2.0

1651
client/src/api/api.ts Normal file

File diff suppressed because it is too large Load Diff

86
client/src/api/base.ts Normal file
View File

@ -0,0 +1,86 @@
/* tslint:disable */
/* eslint-disable */
/**
* DevSpace API
* API for DevSpace
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from './configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
/**
*
* @export
* @interface RequestArgs
*/
export interface RequestArgs {
url: string;
options: RawAxiosRequestConfig;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
}
}
};
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}
}
interface ServerMap {
[key: string]: {
url: string,
description: string,
}[];
}
/**
*
* @export
*/
export const operationServerMap: ServerMap = {
}

150
client/src/api/common.ts Normal file
View File

@ -0,0 +1,150 @@
/* tslint:disable */
/* eslint-disable */
/**
* DevSpace API
* API for DevSpace
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from "./configuration";
import type { RequestArgs } from "./base";
import type { AxiosInstance, AxiosResponse } from 'axios';
import { RequiredError } from "./base";
/**
*
* @export
*/
export const DUMMY_BASE_URL = 'https://example.com'
/**
*
* @throws {RequiredError}
* @export
*/
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
if (paramValue === null || paramValue === undefined) {
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
}
}
/**
*
* @export
*/
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? await configuration.apiKey(keyParamName)
: await configuration.apiKey;
object[keyParamName] = localVarApiKeyValue;
}
}
/**
*
* @export
*/
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
if (configuration && (configuration.username || configuration.password)) {
object["auth"] = { username: configuration.username, password: configuration.password };
}
}
/**
*
* @export
*/
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
object["Authorization"] = "Bearer " + accessToken;
}
}
/**
*
* @export
*/
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
if (configuration && configuration.accessToken) {
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
? await configuration.accessToken(name, scopes)
: await configuration.accessToken;
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
}
}
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
if (parameter == null) return;
if (typeof parameter === "object") {
if (Array.isArray(parameter)) {
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
}
else {
Object.keys(parameter).forEach(currentKey =>
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
);
}
}
else {
if (urlSearchParams.has(key)) {
urlSearchParams.append(key, parameter);
}
else {
urlSearchParams.set(key, parameter);
}
}
}
/**
*
* @export
*/
export const setSearchParams = function (url: URL, ...objects: any[]) {
const searchParams = new URLSearchParams(url.search);
setFlattenedQueryParams(searchParams, objects);
url.search = searchParams.toString();
}
/**
*
* @export
*/
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
const nonString = typeof value !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
: nonString;
return needsSerialization
? JSON.stringify(value !== undefined ? value : {})
: (value || "");
}
/**
*
* @export
*/
export const toPathString = function (url: URL) {
return url.pathname + url.search + url.hash
}
/**
*
* @export
*/
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
return axios.request<T, R>(axiosRequestArgs);
};
}

View File

@ -0,0 +1,110 @@
/* tslint:disable */
/* eslint-disable */
/**
* DevSpace API
* API for DevSpace
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
serverIndex?: number;
baseOptions?: any;
formDataCtor?: new () => any;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* override server index
*
* @type {number}
* @memberof Configuration
*/
serverIndex?: number;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
this.serverIndex = param.serverIndex;
this.baseOptions = param.baseOptions;
this.formDataCtor = param.formDataCtor;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
}

View File

@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

18
client/src/api/index.ts Normal file
View File

@ -0,0 +1,18 @@
/* tslint:disable */
/* eslint-disable */
/**
* DevSpace API
* API for DevSpace
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export * from "./api";
export * from "./configuration";

7
openapitools.json Normal file
View File

@ -0,0 +1,7 @@
{
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.2.0"
}
}

View File

@ -10,6 +10,7 @@
"dependencies": {
"bcrypt": "^5.1.1",
"body-parser": "^1.19.1",
"cors": "^2.8.5",
"express": "^4.17.2",
"jsonwebtoken": "^9.0.2",
"ms": "^2.1.3",
@ -21,6 +22,7 @@
},
"devDependencies": {
"@types/bcrypt": "^5.0.2",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jsonwebtoken": "^9.0.5",
"@types/ms": "^0.7.34",
@ -214,6 +216,15 @@
"@types/node": "*"
}
},
"node_modules/@types/cors": {
"version": "2.8.17",
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz",
"integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/express": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz",
@ -885,6 +896,18 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"node_modules/cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"dependencies": {
"object-assign": "^4",
"vary": "^1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",

View File

@ -5,6 +5,7 @@
"type": "commonjs",
"devDependencies": {
"@types/bcrypt": "^5.0.2",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jsonwebtoken": "^9.0.5",
"@types/ms": "^0.7.34",
@ -17,6 +18,7 @@
"dependencies": {
"bcrypt": "^5.1.1",
"body-parser": "^1.19.1",
"cors": "^2.8.5",
"express": "^4.17.2",
"jsonwebtoken": "^9.0.2",
"ms": "^2.1.3",