Closed as duplicate of#44970
Closed as duplicate of#44970
Description
Hey there,
I've already mentioned it here (For reference). I'm facing an Issue where Endpoints, which are registered outside of the Program.cs don't get included in the generated .json
file.
I've created a Repo for reproduction, you can find it here on Github.
Dotnet-Version: 9.0.101
The generated .json File looks like this, which is missing the endpoints in the Todo.cs
file.
{
"openapi": "3.0.1",
"info": {
"title": "api-dotnet | v1",
"version": "1.0.0"
},
"servers": [
{
"url": "http://localhost:5190"
}
],
"paths": {
"/": {
"get": {
"tags": [
"api-dotnet"
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/hello/{id}": {
"get": {
"tags": [
"api-dotnet"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"components": { },
"tags": [
{
"name": "api-dotnet"
}
]
}