-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Open
Description
Q&A
- OS: Windows 11
- Browser: Edge
- Version: 142.0.3595.94
- Method of installation: via Swashbuckle.AspNetCore.SwaggerUI
- Swagger-UI version: 5.30.2
- Swagger/OpenAPI version: OpenAPI 3.1
Describe the bug you're encountering
I have the following OpenAPI definition:
"parameters": [
{
"name": "Size",
"in": "query",
"required": true,
"schema": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": [
"integer",
"string"
],
"format": "int32"
}
}
],if I try the endpoint in the Swagger UI, when I enter a value for the parameter and then press the Execute button, I get this error:
To reproduce...
This is the full OpenAPI definition:
{
"openapi": "3.1.1",
"info": {
"title": "WebApi | v1",
"version": "1.0.0"
},
"servers": [
{
"url": "http://localhost:5000/"
}
],
"paths": {
"/test": {
"get": {
"tags": [
"WebApi"
],
"parameters": [
{
"name": "Size",
"in": "query",
"required": true,
"schema": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": [
"integer",
"string"
],
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
}
},
"tags": [
{
"name": "WebApi"
}
]
}Metadata
Metadata
Assignees
Labels
No labels