Skip to content

Commit

Permalink
Added an example route to verify [FromServices] attributes are not sh…
Browse files Browse the repository at this point in the history
…own in swagger doc domaindrivendev#2652 & #3
  • Loading branch information
Havunen committed Feb 18, 2024
1 parent 8e3861d commit fa8fab8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/WebSites/Dummy/Controllers/Controller (1).cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,20 @@ public async Task<ActionResult<Nullable<int>>> ComplexIntNullPost(PageData pageD

[HttpGet("{id}/{name}", Name = "FromRouteTwice")]
public async Task Get([FromRoute] int id, [FromRoute] string name) => Ok();

[HttpGet("no/params/here")]
public ActionResult<ProductModel> GetProduct(
[FromServices] IProductModelRequestService productModelRequest,
[FromServices] IProductModelRequestService productModelRequest2,
int id
)
{
return this.Ok(null);
}
}

public class ProductModel
{
public string Name { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Dummy.Controllers
{
public interface IProductModelRequestService
{
}
}

0 comments on commit fa8fab8

Please sign in to comment.