Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
commonsensesoftware committed Dec 5, 2023
1 parent c74f400 commit 6060b03
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using System.Net.Http;
using System.Web.Http;

[ApiVersion(2.0)]
[Route("api/values")]
[ApiVersion( 2.0 )]
[Route( "api/values" )]
public class Values2Controller : ApiController
{
// GET api/values?api-version=2.0
public IHttpActionResult Get() =>
Ok(new
Ok( new
{
controller = GetType().Name,
version = Request.GetRequestedApiVersion().ToString(),
});
} );
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@
using System.Net.Http;
using System.Web.Http;

[RoutePrefix("api/values")]
[RoutePrefix( "api/values" )]
public class Values2Controller : ApiController
{
// GET api/values?api-version=2.0
[Route]
public IHttpActionResult Get() =>
Ok(new
Ok( new
{
controller = GetType().Name,
version = Request.GetRequestedApiVersion().ToString(),
});
} );

// GET api/values/{id}?api-version=2.0
[Route("{id:int}")]
public IHttpActionResult Get(int id) =>
Ok(new
[Route( "{id:int}" )]
public IHttpActionResult Get( int id ) =>
Ok( new
{
controller = GetType().Name,
id,
version = Request.GetRequestedApiVersion().ToString(),
});
} );

// GET api/values?api-version=3.0
[Route]
public IHttpActionResult GetV3() =>
Ok(new
Ok( new
{
controller = GetType().Name,
version = Request.GetRequestedApiVersion().ToString(),
});
} );

// GET api/values/{id}?api-version=3.0
[Route("{id:int}")]
public IHttpActionResult GetV3(int id) =>
Ok(new
[Route( "{id:int}" )]
public IHttpActionResult GetV3( int id ) =>
Ok( new
{
controller = GetType().Name,
id,
version = Request.GetRequestedApiVersion().ToString(),
});
} );
}

0 comments on commit 6060b03

Please sign in to comment.