Commit 573d262f authored by Lê Bảo Hồng Đức's avatar Lê Bảo Hồng Đức

Merge develop-news into release [tag]0.1-vcci

Resolve orval.config.ts conflict: keep committed openapi spec
prioritized before HTTP fallbacks so CI uses deterministic spec.
Update openapi/swagger-output.json with latest backend spec including
forgot-password/request, role, user/{id}/{status,reset-password,role}.

Generated with [Devin](https://devin.ai)
Co-Authored-By: 's avatarDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parents 55241343 7a451864
Pipeline #52514 canceled with stages
in 12 seconds
This diff is collapsed.
...@@ -28,9 +28,15 @@ const backendHost = process.env.NEXT_PUBLIC_BACKEND_HOST; ...@@ -28,9 +28,15 @@ const backendHost = process.env.NEXT_PUBLIC_BACKEND_HOST;
const siteURL = process.env.NEXT_PUBLIC_FRONTEND_HOST; const siteURL = process.env.NEXT_PUBLIC_FRONTEND_HOST;
const swaggerCandidates = [ const swaggerCandidates = [
path.resolve(process.cwd(), "openapi", "swagger-output.json"), // 1) Explicit override (highest priority)
process.env.ORVAL_SWAGGER_URL, process.env.ORVAL_SWAGGER_URL,
// 2) Sibling backend repo (local dev with both repos checked out)
path.resolve(process.cwd(), "..", "vietprodev-cms-backend", "storage", "swagger", "swagger-output.json"), path.resolve(process.cwd(), "..", "vietprodev-cms-backend", "storage", "swagger", "swagger-output.json"),
// 3) Committed spec in repo — deterministic source for CI builds.
// Must be tried BEFORE HTTP URLs: production backend doesn't serve swagger
// and ${backendHost}/swagger/swagger-output.json may return a stale/wrong spec.
path.resolve(process.cwd(), "openapi", "swagger-output.json"),
// 4) HTTP fallbacks (last resort)
`${backendHost}/swagger-output.json`, `${backendHost}/swagger-output.json`,
`${backendHost}/swagger/swagger-output.json`, `${backendHost}/swagger/swagger-output.json`,
`${backendHost}/swagger.json`, `${backendHost}/swagger.json`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment