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,10 +1,10 @@
import Joi from 'joi'
import BaseTomlService from '../../core/base-service/base-toml.js'
import { queryParams } from '../index.js'
import { optionalUrl } from '../validators.js'
import { url } from '../validators.js'
const queryParamSchema = Joi.object({
tomlFilePath: optionalUrl.required(),
tomlFilePath: url,
}).required()
const schema = Joi.object({