feat(openapi): Started working on Openapi generation
- Updated to Typebox 1.0.0 to better support Openapi type generation - Changed dockerfile to fetch depedencies only once - Fixed Routes to properly handle openapi - Fixed Routes to respond with multiples status code (no more only 200) - Fixed Schemas so the auth-gated endpoint properly reflect that - Added Makefile rule to generate openapi client (none working due to missing files)
This commit is contained in:
parent
1bd2b4594b
commit
b7c2a3dff9
36 changed files with 5472 additions and 833 deletions
13
Makefile
13
Makefile
|
|
@ -6,7 +6,7 @@
|
|||
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
||||
# Updated: 2025/10/29 19:37:40 by maiboyer ### ########.fr #
|
||||
# Updated: 2025/11/09 01:22:55 by maiboyer ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
|
|
@ -123,6 +123,12 @@ npm@build:
|
|||
npm@update:
|
||||
(cd ./src/ && rm -rf ./src/node_modules/ && npx pnpm update -r --workspace)
|
||||
|
||||
npm@openapi:
|
||||
@(cd ./src/ && npx pnpm run --if-present -r build:openapi)
|
||||
@rm -f ./src/openapi.json
|
||||
@(cd ./src/ && npx pnpm exec redocly join --without-x-tag-groups)
|
||||
@(cd ./src/ && npx pnpm exec openapi-generator-cli generate -t ../openapi-template -g typescript-fetch -i openapi.json -o ../frontend/src/api/generated);
|
||||
|
||||
# this convert the .dbml file to an actual sql file that SQLite can handle :)
|
||||
sql:
|
||||
@echo "if the command isn't found, contact maieul :)"
|
||||
|
|
@ -138,5 +144,10 @@ tmux:
|
|||
@tmux select-window -t $(PROJECT):0
|
||||
@tmux attach-session -t $(PROJECT)
|
||||
|
||||
fnginx:
|
||||
fnginx &
|
||||
-(cd ./frontend && pnpm exec vite --clearScreen false)
|
||||
wait
|
||||
|
||||
# phony
|
||||
.PHONY: all clean fclean re header footer npm@install npm@clean npm@fclean npm@build sql tmux
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue