Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
0 replies
23 views

I'm trying to generate a C# client from the OpenRouter OpenAPI spec: https://github.com/OpenRouterTeam/typescript-sdk/blob/main/.speakeasy/in.openapi.yaml Among other things there are some enums ...
k2042's user avatar
  • 1
0 votes
1 answer
40 views

I have an ASP.NET Core 8 Web API with a Swagger page using Nswag + OpenAPI3. I also have an OAuth2 security implementation which is working great. Thanks to AspNetCoreOperationSecurityScopeProcessor ...
K0D4's user avatar
  • 2,673
0 votes
1 answer
194 views

The code generated by NSwag allows the consumer to pass a CancellationToken, which it uses on the call to HttpClient.SendAsync, but it doesn't use on the downstream call to response.Content....
Andrew's user avatar
  • 241
0 votes
0 answers
35 views

API, Program.cs: builder.Services.AddControllers().AddJsonOptions(options => { options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()); }); API, MyEnum.cs: public enum ...
sventevit's user avatar
  • 4,804
0 votes
0 answers
46 views

We have an API using NSwag and its SwaggerUI. Our API includes enpoints with byte array members: class SomeData { public int someField { get; set; } //Muse be a property otherwise it's not ...
Medinoc's user avatar
  • 6,699
0 votes
1 answer
58 views

I'm using NSwag library and AzureAD for authentication and want to exclude the swagger UI from asp.net core authentication entirely, similar to using the AllowAnonymous attribute on the controller. ...
Paul B's user avatar
  • 11
0 votes
1 answer
121 views

I have an ASP.NET Core 8.0 MVC application to which I'm adding NSwag. The web application uses a custom authorization filter to apply custom authorization logic to most of the MVC controllers (but not ...
RobSiklos's user avatar
  • 8,881
0 votes
0 answers
449 views

We're generating a C# implementation of a self-developed Web API using Visual Studio's default "Add … Connected service" method. This API returns status 204, if the request was syntactically ...
André Reichelt's user avatar
0 votes
1 answer
641 views

I am trying to generate a valid OpenApiDocument using NSwag but fail when it comes to generate schemas the way they should be. I am currently adding schemas for my types globally like this: var type = ...
Gene's user avatar
  • 4,242
2 votes
1 answer
877 views

I’m working on a .NET 8 Minimal API (web) project and using NSwag for generating Swagger documentation. I have an endpoint that accepts a file upload, and the file parameter is wrapped inside a model ...
awattar's user avatar
  • 478
0 votes
0 answers
149 views

I am using NSwag to generate the controller code for a c# Open API service Then, in Program.cs, it is just a simple code from the sample project var builder = WebApplication.CreateBuilder(args); // ...
kzfid's user avatar
  • 836
1 vote
1 answer
188 views

I need to generate type schemas in OpenApi yaml format. I am considering any technology that can be used to manually create an OpenApi 3.0 document without generation based on ASP.NET Core controllers....
A.K.A.MAGARICH's user avatar
0 votes
0 answers
60 views

Template code: https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.CodeGeneration.TypeScript/Templates/Client.ProcessResponse.Return.liquid Generated code looks something like: protected ...
cyclingLinguist's user avatar
3 votes
0 answers
582 views

I have a .net class library which uses NSwag to generate client code from an OpenApi spec, a portion of which is as follows: "postal_code": { "anyOf": [ { &...
atamata's user avatar
  • 1,167
2 votes
0 answers
239 views

When adding an OpenAPI service reference I can't get the WrapResponseMethods to work. From https://github.com/RicoSuter/NSwag/blob/6b49eefa4048cecfd41ba0d7484bd1f25543d22d/src/NSwag.Commands/Commands/...
Matt's user avatar
  • 1,584
1 vote
1 answer
470 views

I have a .Net 8.0 WebAPI project which Im using NSwag to produce a c# SDK APIClient class so that I can interact with it from another project. NSwag is marking all strings with this attribute [...
glenho123's user avatar
  • 587
0 votes
1 answer
4k views

In the Dotnet API project, recently we are upgradign .NET version from 6 to 8. In the new version of the application, in the nswag.json file "documentGenerator" engine is changed from "...
R.A 1's user avatar
  • 127
0 votes
0 answers
275 views

I'm currently using NSwag to generate a C# client from an OpenAPI specification. I have a particular case where I want a property in my C# model to be calculated based on other properties, similar to ...
Kevin James's user avatar
0 votes
1 answer
459 views

When i use Swagger UI in my ASP .NET Core project, i can't see input parameters data types. I use endpoint like this: /// <summary> /// SomeSummary /// </summary> /// <param name="...
Владислав Пестриков's user avatar
1 vote
1 answer
1k views

I am upgrading the .NET 6.0 project to .NET 8.0. After upgrading the .NET version to 8.0, NSwag.MSBuild package version: <PackageReference Include="NSwag.MSBuild" Version="14.0.4&...
R.A 1's user avatar
  • 127
1 vote
0 answers
157 views

Adding this endpoint: [HttpGet("[action]")] public async ValueTask Test(DateOnly d) { } Causes NSwag to fail with this error: Severity Code Description Project File Line Suppression ...
baddie's user avatar
  • 626
0 votes
0 answers
125 views

Im having an interesting issue in the generated swagger document concerning headers. In this case the header permissions is a string[] In the request object received in the controller instead of the ...
Witted's user avatar
  • 514
3 votes
0 answers
220 views

I have a ASP.NET Core 6.0 and Angular 13 & TypeScript 4.5 project. I use Swagger and NSwag for create TypeScript clients. My swagger.json like as below: { "openapi": "3.0.1",...
Ramil Aliyev 007's user avatar
1 vote
2 answers
1k views

I am using .NET Core 8.0, Newtonsoft json and NSwag to generate a Web API server. We have a custom json error body response we use for errors. That works fine when we generate the error. However, if ...
Frank's user avatar
  • 91
2 votes
0 answers
188 views

Is there a way to generate C# clients with PascalCase properties using NSWagStudio or the nswag command line?
SamIAm's user avatar
  • 2,563

1
2 3 4 5
10