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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user