Skip to content

Commit e27c98f

Browse files
committed
Add current server into OAS, fix invalid data type warning in examples
1 parent d9261d7 commit e27c98f

File tree

19 files changed

+409
-321
lines changed

19 files changed

+409
-321
lines changed

docs/usage/openapi-client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The next steps describe how to generate a JSON:API client library and use our pa
3030

3131
```c#
3232
using var httpClient = new HttpClient();
33-
var apiClient = new ExampleApiClient("http://localhost:14140", httpClient);
33+
var apiClient = new ExampleApiClient(httpClient);
3434

3535
PersonCollectionResponseDocument getResponse = await apiClient.GetPersonCollectionAsync(new Dictionary<string, string?>
3636
{
@@ -145,13 +145,13 @@ From here, continue from step 3 in the list of steps for Visual Studio.
145145
The `OpenApiReference` element in the project file accepts an `Options` element to pass additional settings to the client generator,
146146
which are listed [here](https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.Commands/Commands/CodeGeneration/OpenApiToCSharpClientCommand.cs).
147147
148-
For example, the next section puts the generated code in a namespace, removes the `baseUrl` parameter and generates an interface (which is handy for dependency injection):
148+
For example, the next section puts the generated code in a namespace and generates an interface (which is handy for dependency injection):
149149

150150
```xml
151151
<OpenApiReference Include="swagger.json">
152152
<Namespace>ExampleProject.GeneratedCode</Namespace>
153153
<ClassName>SalesApiClient</ClassName>
154154
<CodeGenerator>NSwagCSharp</CodeGenerator>
155-
<Options>/UseBaseUrl:false /GenerateClientInterfaces:true</Options>
155+
<Options>/GenerateClientInterfaces:true</Options>
156156
</OpenApiReference>
157157
```

0 commit comments

Comments
 (0)