Skip to content

.NET 9 OpenAPI doesn't seem to export schemas (e.g. types) #56586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
shawnwildermuth opened this issue Jul 3, 2024 · 7 comments
Closed
1 task done

.NET 9 OpenAPI doesn't seem to export schemas (e.g. types) #56586

shawnwildermuth opened this issue Jul 3, 2024 · 7 comments
Labels
feature-openapi Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Comments

@shawnwildermuth
Copy link

shawnwildermuth commented Jul 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I create an API that has concrete types but no OpenAPI schemas are exposed. If I use Swagger generation it works fine. So when I map an API:

    app.MapGet("/api/films", GetAllFilms)
      .Produces<FilmResult>()
      .Produces(404)
      .ProducesProblem(500)
      .WithName("getAllFilms")
      .WithDescription("Gets all the Films")
      .WithOpenApi();

There is a repo branch that replicates it: https://github.com/shawnwildermuth/BechdelDataServer/tree/issue/missingschemas

Not sure if the .Produces<FilmResult>() is read my OpenApi, if not, the docs aren't clear.

The OpenAPI doc looksl ike:

{
  "openapi": "3.0.1",
  "info": {
    "title": "BechdelDataServer | v1",
    "version": "1.0.0"
  },
  "paths": {
    "/api/films": {
      "get": {
        "tags": [
          "BechdelApi"
        ],
        "description": "Gets all the Films",
        "operationId": "getAllFilms",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "count",
                    "pageCount",
                    "currentPage",
                    "results"
                  ],
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "pageCount": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "currentPage": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "year": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "title": {
                            "type": "string",
                            "nullable": true
                          },
                          "imdbId": {
                            "type": "string",
                            "nullable": true
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "budget": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "domesticGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "internationalGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "posterUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "overview": {
                            "type": "string",
                            "nullable": true
                          },
                          "rating": {
                            "type": "number",
                            "format": "float"
                          }
                        }
                      },
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "nullable": true
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "nullable": true
                    },
                    "detail": {
                      "type": "string",
                      "nullable": true
                    },
                    "instance": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-aspnetcore-id": "8845b872-28db-412d-8c3d-47b61a7e9b85"
      }
    },
    "/api/film": {
      "get": {
        "tags": [
          "BechdelDataServer"
        ],
        "description": "Get's a film",
        "operationId": "getFilm",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "year": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "imdbId": {
                      "type": "string",
                      "nullable": true
                    },
                    "reason": {
                      "type": "string",
                      "nullable": true
                    },
                    "passed": {
                      "type": "boolean"
                    },
                    "budget": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "domesticGross": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "internationalGross": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "posterUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "overview": {
                      "type": "string",
                      "nullable": true
                    },
                    "rating": {
                      "type": "number",
                      "format": "float"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "nullable": true
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "nullable": true
                    },
                    "detail": {
                      "type": "string",
                      "nullable": true
                    },
                    "instance": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-aspnetcore-id": "06446091-51f8-446c-bc0a-3ee13a7f032c"
      }
    },
    "/api/films/{year}": {
      "get": {
        "tags": [
          "BechdelApi"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "count",
                    "pageCount",
                    "currentPage",
                    "results"
                  ],
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "pageCount": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "currentPage": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "year": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "title": {
                            "type": "string",
                            "nullable": true
                          },
                          "imdbId": {
                            "type": "string",
                            "nullable": true
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "budget": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "domesticGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "internationalGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "posterUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "overview": {
                            "type": "string",
                            "nullable": true
                          },
                          "rating": {
                            "type": "number",
                            "format": "float"
                          }
                        }
                      },
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "nullable": true
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "nullable": true
                    },
                    "detail": {
                      "type": "string",
                      "nullable": true
                    },
                    "instance": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-aspnetcore-id": "ca2df139-e942-4235-896e-77ae517896d7"
      }
    },
    "/api/films/failed": {
      "get": {
        "tags": [
          "BechdelApi"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "count",
                    "pageCount",
                    "currentPage",
                    "results"
                  ],
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "pageCount": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "currentPage": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "year": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "title": {
                            "type": "string",
                            "nullable": true
                          },
                          "imdbId": {
                            "type": "string",
                            "nullable": true
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "budget": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "domesticGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "internationalGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "posterUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "overview": {
                            "type": "string",
                            "nullable": true
                          },
                          "rating": {
                            "type": "number",
                            "format": "float"
                          }
                        }
                      },
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "nullable": true
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "nullable": true
                    },
                    "detail": {
                      "type": "string",
                      "nullable": true
                    },
                    "instance": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-aspnetcore-id": "75eee808-5442-4cfd-8ba7-a041a281bde9"
      }
    },
    "/api/films/passed": {
      "get": {
        "tags": [
          "BechdelApi"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "count",
                    "pageCount",
                    "currentPage",
                    "results"
                  ],
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "pageCount": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "currentPage": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "year": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "title": {
                            "type": "string",
                            "nullable": true
                          },
                          "imdbId": {
                            "type": "string",
                            "nullable": true
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "budget": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "domesticGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "internationalGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "posterUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "overview": {
                            "type": "string",
                            "nullable": true
                          },
                          "rating": {
                            "type": "number",
                            "format": "float"
                          }
                        }
                      },
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "nullable": true
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "nullable": true
                    },
                    "detail": {
                      "type": "string",
                      "nullable": true
                    },
                    "instance": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-aspnetcore-id": "96f4d3ac-1612-46a8-b972-5cadaf370950"
      }
    },
    "/api/films/failed/{year}": {
      "get": {
        "tags": [
          "BechdelApi"
        ],
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "count",
                    "pageCount",
                    "currentPage",
                    "results"
                  ],
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "pageCount": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "currentPage": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "year": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "title": {
                            "type": "string",
                            "nullable": true
                          },
                          "imdbId": {
                            "type": "string",
                            "nullable": true
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "budget": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "domesticGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "internationalGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "posterUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "overview": {
                            "type": "string",
                            "nullable": true
                          },
                          "rating": {
                            "type": "number",
                            "format": "float"
                          }
                        }
                      },
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "nullable": true
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "nullable": true
                    },
                    "detail": {
                      "type": "string",
                      "nullable": true
                    },
                    "instance": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-aspnetcore-id": "ea830310-002c-4b9a-9f0c-b5408888c509"
      }
    },
    "/api/films/passed/{year}": {
      "get": {
        "tags": [
          "BechdelApi"
        ],
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "count",
                    "pageCount",
                    "currentPage",
                    "results"
                  ],
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "pageCount": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "currentPage": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "year": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "title": {
                            "type": "string",
                            "nullable": true
                          },
                          "imdbId": {
                            "type": "string",
                            "nullable": true
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "budget": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "domesticGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "internationalGross": {
                            "type": "integer",
                            "format": "int32"
                          },
                          "posterUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "overview": {
                            "type": "string",
                            "nullable": true
                          },
                          "rating": {
                            "type": "number",
                            "format": "float"
                          }
                        }
                      },
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "nullable": true
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "nullable": true
                    },
                    "detail": {
                      "type": "string",
                      "nullable": true
                    },
                    "instance": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-aspnetcore-id": "9b89b7cb-9e7b-43ae-91bd-cf39c10fd66b"
      }
    },
    "/api/years": {
      "get": {
        "tags": [
          "BechdelApi"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "nullable": true
                    },
                    "title": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "nullable": true
                    },
                    "detail": {
                      "type": "string",
                      "nullable": true
                    },
                    "instance": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "x-aspnetcore-id": "4a6c99a0-b364-4ac4-80ef-96296b49d42b"
      }
    }
  },
  "tags": [
    {
      "name": "BechdelApi"
    },
    {
      "name": "BechdelDataServer"
    }
  ]
}

Expected Behavior

Should include schemas.

Steps To Reproduce

https://github.com/shawnwildermuth/BechdelDataServer/tree/issue/missingschemas

Exceptions (if any)

None.

.NET Version

9.0.100-preview.5.24307.3

Anything else?

.NET SDK:
Version: 9.0.100-preview.5.24307.3
Commit: 35b2c21ea6
Workload version: 9.0.100-manifests.6407b7e4
MSBuild version: 17.11.0-preview-24279-02+b963c24ef

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100-preview.5.24307.3\

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[aspire]
Installation Source: VS 17.10.35013.160, VS 17.11.35017.193
Manifest Version: 9.0.0-preview.2.24163.9/9.0.100-preview.1
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.1\microsoft.net.sdk.aspire\9.0.0-preview.2.24163.9\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: VS 17.10.35013.160
Manifest Version: 17.2.9088-net9-p1/9.0.100-preview.1
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.1\microsoft.net.sdk.ios\17.2.9088-net9-p1\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: VS 17.10.35013.160
Manifest Version: 17.2.9088-net9-p1/9.0.100-preview.1
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.1\microsoft.net.sdk.maccatalyst\17.2.9088-net9-p1\WorkloadManifest.json
Install Type: Msi

[android]
Installation Source: VS 17.10.35013.160
Manifest Version: 34.99.0-preview.1.151/9.0.100-preview.1
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.1\microsoft.net.sdk.android\34.99.0-preview.1.151\WorkloadManifest.json
Install Type: Msi

[maui-windows]
Installation Source: VS 17.10.35013.160
Manifest Version: 9.0.0-preview.1.9973/9.0.100-preview.1
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100-preview.1\microsoft.net.sdk.maui\9.0.0-preview.1.9973\WorkloadManifest.json
Install Type: Msi

Host:
Version: 9.0.0-preview.5.24306.7
Architecture: x64
Commit: a5cc707d97

.NET SDKs installed:
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.423 [C:\Program Files\dotnet\sdk]
7.0.410 [C:\Program Files\dotnet\sdk]
8.0.206 [C:\Program Files\dotnet\sdk]
8.0.300 [C:\Program Files\dotnet\sdk]
8.0.301 [C:\Program Files\dotnet\sdk]
8.0.302 [C:\Program Files\dotnet\sdk]
9.0.100-preview.5.24307.3 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0-preview.5.24306.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0-preview.5.24306.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.0-preview.5.24306.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Jul 3, 2024
@martincostello martincostello added feature-openapi old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Jul 3, 2024
@martincostello
Copy link
Member

If I understand correctly, this issue is that all the schemas are inline are there are no components?

If so, this was implemented by #56175 and initial support will be in preview 6, with further changes in preview 7.

@captainsafia
Copy link
Member

captainsafia commented Jul 3, 2024

@shawnwildermuth Thanks for reporting this issue!

As @martincostello mentioned, you can try this out in the latest preivew.7 builds of the package (9.0.0-preview.7.24353.6). Can you try updating your package reference and sharing any additional feedback you have there?

Edit: BTW, your repro seems to indicate that you're actually using Swashbuckle.AspNetCore to generate OpenAPI documents. Is the repro up to date?

@captainsafia captainsafia added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Jul 3, 2024
@shawnwildermuth
Copy link
Author

@shawnwildermuth Thanks for reporting this issue!

As @martincostello mentioned, you can try this out in the latest preivew.7 builds of the package (9.0.0-preview.7.24353.6). Can you try updating your package reference and sharing any additional feedback you have there?

Not sure how to get that version, is there a nightly nuget (haven't used that before).

Edit: BTW, your repro seems to indicate that you're actually using Swashbuckle.AspNetCore to generate OpenAPI documents. Is the repro up to date?

Make sure you're in the net9 branch. The net9 branch has swagger disabled

@dotnet-policy-service dotnet-policy-service bot added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Jul 4, 2024
@shawnwildermuth
Copy link
Author

@shawnwildermuth Thanks for reporting this issue!

As @martincostello mentioned, you can try this out in the latest preivew.7 builds of the package (9.0.0-preview.7.24353.6). Can you try updating your package reference and sharing any additional feedback you have there?

Edit: BTW, your repro seems to indicate that you're actually using Swashbuckle.AspNetCore to generate OpenAPI documents. Is the repro up to date?

Also, I entered the wrong repo branch (I updated it above), but you can replicate it here:

https://github.com/shawnwildermuth/BechdelDataServer/tree/issue/missingschemas

@martincostello
Copy link
Member

Not sure how to get that version, is there a nightly nuget (haven't used that before).

@captainsafia captainsafia added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Jul 10, 2024
Copy link
Contributor

Hi @shawnwildermuth. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@shawnwildermuth
Copy link
Author

This looks fixed in Preview 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-openapi Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Projects
None yet
Development

No branches or pull requests

3 participants