Skip to content
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

Replace file destination instructions for OpenAPI build-time documentation so projects can build correctly #34509

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sander1095
Copy link

@sander1095 sander1095 commented Jan 16, 2025

@captainsafia
Copy link
Member

@sander1095 What operating system did you observe these issues on? When this doc was written we observed that ./ wasn't resilient to path handling in Windows.

@sander1095
Copy link
Author

sander1095 commented Jan 16, 2025

Hi @captainsafia !

I'm running on Windows 11. You're correct, when running on Ubuntu (via WSL), ./ does work.

However, this means the docs should be updated:

  • to either reflect the fact that Windows and linux needs different paths, OR
  • the ./ needs to be replaced with . , which works both on Windows and Ubuntu (WSL).

This PR does the latter. I do not have a mac available to test this on. I believe we should advocate for a single solution that works for all OS's, as teams can use multiple OS's :).

I remember you having a mac? If this works on your machine, would you consider accepting this approach? If you'd like me to take a different path, let me know!

@wadepickett
Copy link
Contributor

wadepickett commented Jan 16, 2025

Just a side note with a verification point:
I just tested it on Windows 11 Enterprise v 10.0.26100 + .NET SDK 9.0.102 using the sample for this doc: https://github.com/dotnet/AspNetCore.Docs/tree/3b6e82c616db6bfa0ec5899c268b02fc001b6d99/aspnetcore/fundamentals/openapi/samples/9.x/WebMinOpenApi

It compiled, no build error for that particular setup using either:
<OpenApiDocumentsDirectory>./</OpenApiDocumentsDirectory>
or
<OpenApiDocumentsDirectory>.</OpenApiDocumentsDirectory>

@Rick-Anderson
Copy link
Contributor

Rick-Anderson commented Jan 16, 2025

I found that here. See #33361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenAPI build-time generation's file destination is incorrect and causes build errors
4 participants