@@ -599,7 +599,6 @@ public async Task<IActionResult> SetUserDescriptionAsync(string referenceId, [Fr
599
599
600
600
[ HttpPatch ( "~/api/v1/error/{id:objectid}" ) ]
601
601
[ ConfigurationResponseFilter ]
602
- [ ApiExplorerSettings ( IgnoreApi = true ) ]
603
602
public async Task < IActionResult > LegacyPatchAsync ( string id , [ FromBody ] Delta < UpdateEvent > changes ) {
604
603
if ( changes == null )
605
604
return Ok ( ) ;
@@ -669,20 +668,20 @@ await Task.WhenAll(
669
668
/// <code><![CDATA[/events/submit/log?access_token=YOUR_API_KEY&message=Hello World&source=server01&geo=32.85,-96.9613&randomproperty=true]]></code>
670
669
/// </remarks>
671
670
/// <param name="projectId">The identifier of the project.</param>
672
- /// <param name="version ">The api version that should be used</param>
671
+ /// <param name="apiVersion ">The api version that should be used</param>
673
672
/// <param name="type">The event type</param>
674
673
/// <param name="userAgent">The user agent that submitted the event.</param>
675
674
/// <param name="parameters">Query String parameters that control what properties are set on the event</param>
676
675
/// <response code="200">OK</response>
677
676
/// <response code="400">No project id specified and no default project was found.</response>
678
677
/// <response code="404">No project was found.</response>
679
- [ HttpGet ( "~/api/v{version :int=2}/events/submit" ) ]
680
- [ HttpGet ( "~/api/v{version :int=2}/events/submit/{type:minlength(1)}" ) ]
681
- [ HttpGet ( "~/api/v{version :int=2}/projects/{projectId:objectid}/events/submit" ) ]
682
- [ HttpGet ( "~/api/v{version :int=2}/projects/{projectId:objectid}/events/submit/{type:minlength(1)}" ) ]
678
+ [ HttpGet ( "~/api/v{apiVersion :int=2}/events/submit" ) ]
679
+ [ HttpGet ( "~/api/v{apiVersion :int=2}/events/submit/{type:minlength(1)}" ) ]
680
+ [ HttpGet ( "~/api/v{apiVersion :int=2}/projects/{projectId:objectid}/events/submit" ) ]
681
+ [ HttpGet ( "~/api/v{apiVersion :int=2}/projects/{projectId:objectid}/events/submit/{type:minlength(1)}" ) ]
683
682
[ ConfigurationResponseFilter ]
684
683
[ SwaggerResponse ( StatusCodes . Status200OK ) ]
685
- public async Task < IActionResult > GetSubmitEventAsync ( string projectId = null , int version = 2 , string type = null , [ UserAgent ] string userAgent = null , [ QueryStringParameters ] IDictionary < string , string [ ] > parameters = null ) {
684
+ public async Task < IActionResult > GetSubmitEventAsync ( string projectId = null , int apiVersion = 2 , string type = null , [ UserAgent ] string userAgent = null , [ QueryStringParameters ] IDictionary < string , string [ ] > parameters = null ) {
686
685
var filteredParameters = parameters ? . Where ( p => ! String . IsNullOrEmpty ( p . Key ) && ! p . Value . All ( String . IsNullOrEmpty ) && ! _ignoredKeys . Contains ( p . Key ) ) . ToList ( ) ;
687
686
if ( filteredParameters == null || filteredParameters . Count == 0 )
688
687
return Ok ( ) ;
@@ -779,7 +778,7 @@ public async Task<IActionResult> GetSubmitEventAsync(string projectId = null, in
779
778
780
779
var stream = new MemoryStream ( ev . GetBytes ( _jsonSerializerSettings ) ) ;
781
780
await _eventPostService . EnqueueAsync ( new EventPost {
782
- ApiVersion = version ,
781
+ ApiVersion = apiVersion ,
783
782
CharSet = charSet ,
784
783
ContentEncoding = contentEncoding ,
785
784
IpAddress = Request . GetClientIpAddress ( ) ,
@@ -800,6 +799,13 @@ await _eventPostService.EnqueueAsync(new EventPost {
800
799
return Ok ( ) ;
801
800
}
802
801
802
+
803
+ [ HttpPost ( "~/api/v1/error" ) ]
804
+ [ ConfigurationResponseFilter ]
805
+ public Task < IActionResult > LegacyPostAsync ( [ UserAgent ] string userAgent = null ) {
806
+ return PostAsync ( null , 1 , userAgent ) ;
807
+ }
808
+
803
809
/// <summary>
804
810
/// Create
805
811
/// </summary>
@@ -845,17 +851,16 @@ await _eventPostService.EnqueueAsync(new EventPost {
845
851
/// </code>
846
852
/// </remarks>
847
853
/// <param name="projectId">The identifier of the project.</param>
848
- /// <param name="version ">The api version that should be used</param>
854
+ /// <param name="apiVersion ">The api version that should be used</param>
849
855
/// <param name="userAgent">The user agent that submitted the event.</param>
850
856
/// <response code="202">Accepted</response>
851
857
/// <response code="400">No project id specified and no default project was found.</response>
852
858
/// <response code="404">No project was found.</response>
853
- [ HttpPost ( "~/api/v{version:int=1}/error" ) ]
854
- [ HttpPost ( "~/api/v{version:int=2}/events" ) ]
855
- [ HttpPost ( "~/api/v{version:int=2}/projects/{projectId:objectid}/events" ) ]
859
+ [ HttpPost ( "~/api/v{apiVersion:int=2}/events" ) ]
860
+ [ HttpPost ( "~/api/v{apiVersion:int=2}/projects/{projectId:objectid}/events" ) ]
856
861
[ ConfigurationResponseFilter ]
857
862
[ SwaggerResponse ( StatusCodes . Status202Accepted ) ]
858
- public async Task < IActionResult > PostAsync ( string projectId = null , int version = 2 , [ UserAgent ] string userAgent = null ) {
863
+ public async Task < IActionResult > PostAsync ( string projectId = null , int apiVersion = 2 , [ UserAgent ] string userAgent = null ) {
859
864
if ( Request . ContentLength . HasValue && Request . ContentLength . Value <= 0 )
860
865
return StatusCode ( StatusCodes . Status202Accepted ) ;
861
866
@@ -890,7 +895,7 @@ await _eventPostService.EnqueueAsync(new EventPost {
890
895
}
891
896
892
897
await _eventPostService . EnqueueAsync ( new EventPost {
893
- ApiVersion = version ,
898
+ ApiVersion = apiVersion ,
894
899
CharSet = charSet ,
895
900
ContentEncoding = Request . Headers . TryGetAndReturn ( Headers . ContentEncoding ) ,
896
901
IpAddress = Request . GetClientIpAddress ( ) ,
0 commit comments