Skip to content

Commit

Permalink
Fix duplicated samples in http endpoints and integration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticmind committed Oct 17, 2024
1 parent 6f0fd7c commit 692db66
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
11 changes: 1 addition & 10 deletions docs/guide/http/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,7 @@ public class HelloEndpoint
public string Get() => "Hello.";
}
```
<sup><a href='https://github.com/JasperFx/wolverine/blob/main/src/Http/NSwagDemonstrator/HelloEndpoint.cs#L5-L13' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_hello_world_with_wolverine_http' title='Start of snippet'>anchor</a></sup>
<a id='snippet-sample_hello_world_with_wolverine_http-1'></a>
```cs
public class HelloEndpoint
{
[WolverineGet("/")]
public string Get() => "Hello.";
}
```
<sup><a href='https://github.com/JasperFx/wolverine/blob/main/src/Samples/TodoWebService/TodoWebService/HelloEndpoint.cs#L5-L13' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_hello_world_with_wolverine_http-1' title='Start of snippet'>anchor</a></sup>
<sup><a href='https://github.com/JasperFx/wolverine/blob/main/src/Samples/TodoWebService/TodoWebService/HelloEndpoint.cs#L5-L13' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_hello_world_with_wolverine_http' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

## Using IResult
Expand Down
11 changes: 1 addition & 10 deletions docs/guide/http/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,7 @@ public class HelloEndpoint
public string Get() => "Hello.";
}
```
<sup><a href='https://github.com/JasperFx/wolverine/blob/main/src/Http/NSwagDemonstrator/HelloEndpoint.cs#L5-L13' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_hello_world_with_wolverine_http' title='Start of snippet'>anchor</a></sup>
<a id='snippet-sample_hello_world_with_wolverine_http-1'></a>
```cs
public class HelloEndpoint
{
[WolverineGet("/")]
public string Get() => "Hello.";
}
```
<sup><a href='https://github.com/JasperFx/wolverine/blob/main/src/Samples/TodoWebService/TodoWebService/HelloEndpoint.cs#L5-L13' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_hello_world_with_wolverine_http-1' title='Start of snippet'>anchor</a></sup>
<sup><a href='https://github.com/JasperFx/wolverine/blob/main/src/Samples/TodoWebService/TodoWebService/HelloEndpoint.cs#L5-L13' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_hello_world_with_wolverine_http' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

At application startup, WolverineFx.Http will find the `HelloEndpoint.Get()` method and treat it as a Wolverine http endpoint with
Expand Down
4 changes: 0 additions & 4 deletions src/Http/NSwagDemonstrator/HelloEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

namespace NSwagDemonstrator;

#region sample_hello_world_with_wolverine_http

public class HelloEndpoint
{
[WolverineGet("/")]
public string Get() => "Hello.";
}

#endregion

0 comments on commit 692db66

Please sign in to comment.