I have controller like
public class UserController : ApiController
{
[Route("api/user")]
IHttpActionResult GetUser() { ... }
}
public class ResumeController : ApiController
{
[Route("api/user/resumes")]
IHttpActionResult GetResumes() { ... }
}
Which on swagger generates output like
Is there a way (besides overriding default implementation by rolling out your own ISwaggerProvider
or merging two controllers into one) to enforce the group name ? Something like
public class UserController : ApiController
{
[Route("api/user")]
[MagicalAttributeName(Group="User")]
IHttpActionResult GetUser() { ... }
}
public class ResumeController : ApiController
{
[Route("api/user/resumes")]
[MagicalAttributeName(Group="User")]
IHttpActionResult GetResumes() { ... }
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…