Skip to content

Fix URI parsing + typebox/typescript/node upgrade#227

Merged
HugoGresse merged 4 commits intomainfrom
Allow-URL-in-API-alogn-with-URI
Mar 17, 2026
Merged

Fix URI parsing + typebox/typescript/node upgrade#227
HugoGresse merged 4 commits intomainfrom
Allow-URL-in-API-alogn-with-URI

Conversation

@HugoGresse
Copy link
Owner

@HugoGresse HugoGresse commented Mar 17, 2026

  • Fix URI parsing on the API
  • Update Typebox to v1, Typescript and node 20 to 24

Copilot AI review requested due to automatic review settings March 17, 2026 17:07
@HugoGresse HugoGresse temporarily deployed to GitHub Action PR March 17, 2026 17:07 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

Visit the preview URL for this PR (updated for commit 8294073):

(expires Tue, 24 Mar 2026 20:56:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0c15c45ea5a4c54095387eacf30c3755c9260f22

@HugoGresse HugoGresse changed the title Allow Url along with Uri on the API feat: Allow Url along with Uri on the API Mar 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to broaden API request validation for link fields by accepting "url" in addition to "uri" in several TypeBox schemas.

Changes:

  • Updated sponsor/job post schemas to accept externalLink as uri | url
  • Updated sponsor schemas to accept website/logoUrl as uri | url
  • Updated sessions/speakers and file reupload schemas to accept various link fields as uri | url (plus null where applicable)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
functions/src/api/routes/sponsors/updateJobPostPUT.ts Expands externalLink validation to `uri
functions/src/api/routes/sponsors/addSponsorsPOST.ts Expands website/logoUrl validation to `uri
functions/src/api/routes/sponsors/addJobPostPOST.ts Expands job post externalLink validation to `uri
functions/src/api/routes/sessionsSpeakers/sessionsSpeakers.ts Expands multiple speaker/session link fields to `uri
functions/src/api/routes/file/downloadAndReuploadFilePOST.ts Expands url body field validation to `uri

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Cloud Functions Fastify API to use the newer typebox package (and updated Fastify TypeBox type provider), with accompanying TypeBox import/format-registry changes across routes so schemas continue to build and Swagger remains registered.

Changes:

  • Upgraded @fastify/type-provider-typebox and migrated from @sinclair/typebox to typebox, updating imports across API/service routes.
  • Updated TypeBox custom format registration to use typebox/format APIs.
  • Adjusted TS/Fastify typing and schema definitions (e.g., FilesOutputs union) and enabled skipLibCheck in the functions TS config.

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
functions/tsconfig.json Enables skipLibCheck in the functions TypeScript build.
functions/package.json Upgrades @fastify/type-provider-typebox and replaces @sinclair/typebox with typebox.
functions/package-lock.json Lockfile updates reflecting the dependency upgrades/removal.
functions/src/serviceApi/pdf.ts Migrates TypeBox import to typebox.
functions/src/api/swagger.ts Adjusts Fastify instance typing for Swagger registration.
functions/src/api/apiKeyPlugin.ts Migrates TypeBox imports to typebox.
functions/src/api/other/addContentTypeParserForServerless.ts Adjusts Fastify instance typing for the parser helper.
functions/src/api/other/typeBoxAdditionalsFormats.ts Switches custom format registration to typebox/format.
functions/src/api/routes/transcription/transcription.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/addJobPostPOST.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/addSponsorsPOST.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/approveJobPostPUT.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/deleteJobPostDELETE.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/generateSponsorTokenPOST.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/getJobPostGET.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/getJobPostsGET.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/getSponsorJobPostsGET.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/trackJobPostClickPOST.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sponsors/updateJobPostPUT.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sessions/sessions.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/sessionsSpeakers/sessionsSpeakers.ts Migrates TypeBox imports and switches format registration to typebox/format.
functions/src/api/routes/sessionsSpeakers/verifyOverwriteData.ts Migrates TypeBox/Value imports to typebox modules.
functions/src/api/routes/file/addFilePOST.ts Migrates TypeBox imports and rewrites the union schema definition.
functions/src/api/routes/file/downloadAndReuploadFilePOST.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/faq/faq.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/event/getEvent.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/event/getPdfMetadata.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/event/exportSchedulePdf.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/deploy/deploy.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/deploy/getDeployFiles.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/bupher/bupherChannelsRoute.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/bupher/bupherDraftPostRoute.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/bupher/bupherLoginRoute.ts Migrates TypeBox imports to typebox.
functions/src/api/routes/bupher/bupherScheduledPostsRoute.ts Migrates TypeBox imports to typebox.
Files not reviewed (1)
  • functions/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

"outDir": "lib",
"sourceMap": true,
"strict": true,
"skipLibCheck": true,
import { FastifyInstance } from 'fastify'

export const addContentTypeParserForServerless = (fastify: FastifyInstance) => {
export const addContentTypeParserForServerless = (fastify: FastifyInstance<any, any, any, any, any>) => {
@HugoGresse HugoGresse deployed to GitHub Action PR March 17, 2026 20:55 — with GitHub Actions Active
@HugoGresse HugoGresse changed the title feat: Allow Url along with Uri on the API Fix URI parsing + typebox/typescript/node upgrade Mar 17, 2026
@HugoGresse HugoGresse merged commit 7df8626 into main Mar 17, 2026
5 checks passed
@HugoGresse HugoGresse deleted the Allow-URL-in-API-alogn-with-URI branch March 17, 2026 20:58
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

Successfully merging this pull request may close these issues.

2 participants