119 lines
2.9 KiB
JavaScript
Raw Normal View History

2021-09-06 08:52:37 +02:00
'use strict';
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
const { UsersPermissionsRouteValidator } = require('./validation');
module.exports = (strapi) => {
const validator = new UsersPermissionsRouteValidator(strapi);
return [
{
method: 'GET',
path: '/connect/(.*)',
handler: 'auth.connect',
config: {
middlewares: ['plugin::users-permissions.rateLimit'],
prefix: '',
},
2021-09-06 08:52:37 +02:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
{
method: 'POST',
path: '/auth/local',
handler: 'auth.callback',
config: {
middlewares: ['plugin::users-permissions.rateLimit'],
prefix: '',
},
request: {
body: { 'application/json': validator.loginBodySchema },
},
response: validator.authResponseSchema,
2021-09-06 08:52:37 +02:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
{
method: 'POST',
path: '/auth/local/register',
handler: 'auth.register',
config: {
middlewares: ['plugin::users-permissions.rateLimit'],
prefix: '',
},
request: {
body: { 'application/json': validator.registerBodySchema },
},
response: validator.authRegisterResponseSchema,
2021-09-06 08:52:37 +02:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
{
method: 'GET',
path: '/auth/:provider/callback',
handler: 'auth.callback',
config: {
prefix: '',
},
request: {
params: {
provider: validator.providerParam,
},
},
response: validator.authResponseSchema,
2021-09-06 08:52:37 +02:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
{
method: 'POST',
path: '/auth/forgot-password',
handler: 'auth.forgotPassword',
config: {
middlewares: ['plugin::users-permissions.rateLimit'],
prefix: '',
},
request: {
body: { 'application/json': validator.forgotPasswordBodySchema },
},
response: validator.forgotPasswordResponseSchema,
2021-09-06 08:52:37 +02:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
{
method: 'POST',
path: '/auth/reset-password',
handler: 'auth.resetPassword',
config: {
middlewares: ['plugin::users-permissions.rateLimit'],
prefix: '',
},
request: {
body: { 'application/json': validator.resetPasswordBodySchema },
},
response: validator.authResponseSchema,
2021-09-06 08:52:37 +02:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
{
method: 'GET',
path: '/auth/email-confirmation',
handler: 'auth.emailConfirmation',
config: {
prefix: '',
},
2021-09-06 08:52:37 +02:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
{
method: 'POST',
path: '/auth/send-email-confirmation',
handler: 'auth.sendEmailConfirmation',
config: {
prefix: '',
},
request: {
body: { 'application/json': validator.sendEmailConfirmationBodySchema },
},
response: validator.sendEmailConfirmationResponseSchema,
2021-09-06 08:52:37 +02:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
{
method: 'POST',
path: '/auth/change-password',
handler: 'auth.changePassword',
config: {
middlewares: ['plugin::users-permissions.rateLimit'],
prefix: '',
},
request: {
body: { 'application/json': validator.changePasswordBodySchema },
},
response: validator.authResponseSchema,
2022-03-20 19:50:08 +01:00
},
Add new @strapi/openapi package (#24024) * chore(openapi): add new @strapi/openapi package with initial setup (#23173) * enhancement(openapi): add routes collection (#23182) * chore(openapi): add new @strapi/openapi package with initial setup and configuration * fix: lint the test folder * chore(openapi): add coverage/ to .eslintignore for better linting exclusion * test(openapi): update Jest config with refined test paths and coverage * chore: remove unused test and update openapi dependencies * feat(openapi): add route providers, collector, and matcher * test(openapi): add unit tests for route matching and providers * fix: make the AbstractRoutesProvider constructor public * chore: update test paths and imports to simplify structure * test: update route provider tests to use dynamic fixture lengths * feat: add basic openapi document generation (#23365) * chore: update openapi dependencies * feat(openapi): advanced schema generation (#23467) * chore: rename openapi:generate CLI command to openapi generate (#23610) * chore(openapi): add experimental warning message for OpenAPI generation feature (#23608) Co-authored-by: Jamie Howard <jhoward1994@gmail.com> * chore: update OpenAPI types to OpenAPIV3_1 across the codebase (#23609) * chore: merge origin/develop * chore: update zod dependency from beta version to 3.25.67 across the codebase using zod/v4 where needed * fix(strapi): add output option for openapi generation command (#23849) * feat(core): add uid transformation utility for openapi compliant names (#23833) * feat(core): add uid transformation utility for openapi compliant names * chore: version openapi to 5.16.1 * chore(core): update uid parameter to use internal types * fix(core): simplify global registry check * fix(core): remove unnecessary type assertion * fix(core): add type assertions in validation attributes * fix(core): remove unused import * chore: update @strapi/openapi to 5.18.1 * Add zod schema validation to content api routes (#23886) * feat(i18n): zod validation for locale content api routes * feat(email): integrate zod for email content api routes * feat(upload): wip partial zod route validation * feat: add validation for upload and ctb content api routes (#23924) * feat: add validation for content API routes and upload * fix: fix linting errors and prettier error * fix: add missing schemas * chore(content-type-builder): more accurate zod descriptions * Centralise AbstractRouteValidator to strapi utils (#23962) * chore(utils): centralise abstractroutevalidator in utils for package use and schema aware extension in strapi core * chore(core): update query parameter transformer usage in convert-query-params tests * feat(core): enhance schema validation error handling and logging * fix: revert incorrect changes --------- Co-authored-by: Jamie Howard <jhoward1994@gmail.com> Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> * feat(users-permissions): zod schemas for content-api routes (#23997) * feat(users-permissions): zod schemas for content-api routes * fix(users-permissions): formatting * chore: include content type for API route request body --------- Co-authored-by: Ziyi <ziyi.yuan@strapi.io> * chore: minor clean up --------- Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu> Co-authored-by: Ziyi <ziyi.yuan@strapi.io>
2025-07-28 12:02:09 +01:00
];
};