Replies: 7 comments
-
I would expect this to be in the WebUI project because it's part of the presentation layer. The Application project should be independent of the technology used for presentation (REST, GraphQL, MVC, etc). |
Beta Was this translation helpful? Give feedback.
-
@bommen What if i need to use the data from this in Services within my Infrastructure? It's not OK to reference within Infrastructure to WebUI? |
Beta Was this translation helpful? Give feedback.
-
@Inexad I'm curious what the specific case is where you would reference your OpenAPI doc (swagger.json) in your Application or Infrastructure layer. Could you give an example of why you would need this? |
Beta Was this translation helpful? Give feedback.
-
I use this to generate service class library. This was added automatically when using "Connected Services" in Visual Studio 2019. I guess it downloads the open api spec file and then generates code from it. |
Beta Was this translation helpful? Give feedback.
-
@Inexad If I understand correctly, the service class library you generated using "connected services" in Visual Studio 2019 is a third party service you need to call? |
Beta Was this translation helpful? Give feedback.
-
In that case you appear to be consuming the API in the WebUI project from within the Infrastructure project. I would place the folder in the Infrastructure project. |
Beta Was this translation helpful? Give feedback.
-
Thanks ! I put it in Infrastructure project. @fretje What do you think about "Settings" classes? Thinking about appsettings injected into controllers using IOptionsMonitor. |
Beta Was this translation helpful? Give feedback.
-
Where should i put OpenAPIs folder ?
Currently i put it in Application folder, is this correct ?
Beta Was this translation helpful? Give feedback.
All reactions