File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,14 @@ public void ConfigureServices( IServiceCollection services )
3030 // reporting api versions will return the headers "api-supported-versions" and "api-deprecated-versions"
3131 options . ReportApiVersions = true ;
3232
33- // apply api versions using conventions rather than attributes
3433 options . Conventions . Controller < ValuesController > ( ) . HasApiVersion ( 1 , 0 ) ;
34+
3535 options . Conventions . Controller < Values2Controller > ( )
3636 . HasApiVersion ( 2 , 0 )
3737 . HasApiVersion ( 3 , 0 )
38- . Action ( c => c . GetV3 ( default ( ApiVersion ) ) ) . MapToApiVersion ( 3 , 0 )
39- . Action ( c => c . GetV3 ( default ( int ) , default ( ApiVersion ) ) ) . MapToApiVersion ( 3 , 0 ) ;
38+ . Action ( c => c . GetV3 ( default ) ) . MapToApiVersion ( 3 , 0 )
39+ . Action ( c => c . GetV3 ( default , default ) ) . MapToApiVersion ( 3 , 0 ) ;
40+
4041 options . Conventions . Controller < HelloWorldController > ( )
4142 . HasApiVersion ( 1 , 0 )
4243 . HasApiVersion ( 2 , 0 )
Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ public void ConfigureServices( IServiceCollection services )
4444
4545 // configure query options (which cannot otherwise be configured by OData conventions)
4646 options . QueryOptions . Controller < V2 . PeopleController > ( )
47- . Action ( c => c . Get ( default ( ODataQueryOptions < Person > ) ) ) . Allow ( Skip | Count ) . AllowTop ( 100 ) ;
47+ . Action ( c => c . Get ( default ) ) . Allow ( Skip | Count ) . AllowTop ( 100 ) ;
4848
4949 options . QueryOptions . Controller < V3 . PeopleController > ( )
50- . Action ( c => c . Get ( default ( ODataQueryOptions < Person > ) ) ) . Allow ( Skip | Count ) . AllowTop ( 100 ) ;
50+ . Action ( c => c . Get ( default ) ) . Allow ( Skip | Count ) . AllowTop ( 100 ) ;
5151 } ) ;
5252 services . AddSwaggerGen (
5353 options =>
You can’t perform that action at this time.
0 commit comments