URL validator tidyup; affects [discourse dynamic endpoint gerrit jira maven nexus osslifecycle python vpm website] securityheaders sonar swagger w3c (#10810)

* add a required url validator

* replace occurrences of optionalUrl.required() with url

* use standard validators in server.js
This commit is contained in:
chris48s
2025-01-18 19:16:41 +00:00
committed by GitHub
parent 49bcb52173
commit 954147f7d9
19 changed files with 48 additions and 38 deletions

View File

@@ -1,9 +1,9 @@
import Joi from 'joi'
import { optionalUrl } from '../validators.js'
import { url } from '../validators.js'
import { BaseJsonService, pathParam, queryParam } from '../index.js'
const queryParamSchema = Joi.object({
baseUrl: optionalUrl.required(),
baseUrl: url,
}).required()
const schema = Joi.object({