1
1
//----------------------
2
2
// <auto-generated>
3
- // Generated using the NSwag toolchain v14.3 .0.0 (NJsonSchema v11.2.0 .0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
3
+ // Generated using the NSwag toolchain v14.4 .0.0 (NJsonSchema v11.3.2 .0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4
4
// </auto-generated>
5
5
//----------------------
6
6
12
12
using Certify . Models . Hub ;
13
13
using Certify . Models . Config . Migration ;
14
14
using Certify . Shared ;
15
+ using FileResult = Microsoft . AspNetCore . Mvc . FileResult ;
15
16
16
17
#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended."
17
18
#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword."
@@ -33,7 +34,7 @@ namespace Certify.Server.Hub.Api
33
34
{
34
35
using System = global ::System ;
35
36
36
- [ System . CodeDom . Compiler . GeneratedCode ( "NSwag" , "14.3 .0.0 (NJsonSchema v11.2.0 .0 (Newtonsoft.Json v13.0.0.0))" ) ]
37
+ [ System . CodeDom . Compiler . GeneratedCode ( "NSwag" , "14.4 .0.0 (NJsonSchema v11.3.2 .0 (Newtonsoft.Json v13.0.0.0))" ) ]
37
38
public partial class Client
38
39
{
39
40
#pragma warning disable 8618
@@ -4579,6 +4580,166 @@ public virtual async System.Threading.Tasks.Task<ActionResult> RemoveManagedChal
4579
4580
}
4580
4581
}
4581
4582
4583
+ /// <returns>OK</returns>
4584
+ /// <exception cref="ApiException">A server side error occurred.</exception>
4585
+ public virtual System . Threading . Tasks . Task < FileResponse > GetPreviewAsMarkdownAsync ( ManagedCertificate body )
4586
+ {
4587
+ return GetPreviewAsMarkdownAsync ( body , System . Threading . CancellationToken . None ) ;
4588
+ }
4589
+
4590
+ /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
4591
+ /// <returns>OK</returns>
4592
+ /// <exception cref="ApiException">A server side error occurred.</exception>
4593
+ public virtual async System . Threading . Tasks . Task < FileResponse > GetPreviewAsMarkdownAsync ( ManagedCertificate body , System . Threading . CancellationToken cancellationToken )
4594
+ {
4595
+ var client_ = _httpClient ;
4596
+ var disposeClient_ = false ;
4597
+ try
4598
+ {
4599
+ using ( var request_ = new System . Net . Http . HttpRequestMessage ( ) )
4600
+ {
4601
+ var json_ = Newtonsoft . Json . JsonConvert . SerializeObject ( body , JsonSerializerSettings ) ;
4602
+ var content_ = new System . Net . Http . StringContent ( json_ ) ;
4603
+ content_ . Headers . ContentType = System . Net . Http . Headers . MediaTypeHeaderValue . Parse ( "application/json" ) ;
4604
+ request_ . Content = content_ ;
4605
+ request_ . Method = new System . Net . Http . HttpMethod ( "POST" ) ;
4606
+ request_ . Headers . Accept . Add ( System . Net . Http . Headers . MediaTypeWithQualityHeaderValue . Parse ( "text/html" ) ) ;
4607
+
4608
+ var urlBuilder_ = new System . Text . StringBuilder ( ) ;
4609
+ if ( ! string . IsNullOrEmpty ( _baseUrl ) ) urlBuilder_ . Append ( _baseUrl ) ;
4610
+ // Operation Path: "internal/v1/preview/managedcertificate"
4611
+ urlBuilder_ . Append ( "internal/v1/preview/managedcertificate" ) ;
4612
+
4613
+ PrepareRequest ( client_ , request_ , urlBuilder_ ) ;
4614
+
4615
+ var url_ = urlBuilder_ . ToString ( ) ;
4616
+ request_ . RequestUri = new System . Uri ( url_ , System . UriKind . RelativeOrAbsolute ) ;
4617
+
4618
+ PrepareRequest ( client_ , request_ , url_ ) ;
4619
+
4620
+ var response_ = await client_ . SendAsync ( request_ , System . Net . Http . HttpCompletionOption . ResponseHeadersRead , cancellationToken ) . ConfigureAwait ( false ) ;
4621
+ var disposeResponse_ = true ;
4622
+ try
4623
+ {
4624
+ var headers_ = new System . Collections . Generic . Dictionary < string , System . Collections . Generic . IEnumerable < string > > ( ) ;
4625
+ foreach ( var item_ in response_ . Headers )
4626
+ headers_ [ item_ . Key ] = item_ . Value ;
4627
+ if ( response_ . Content != null && response_ . Content . Headers != null )
4628
+ {
4629
+ foreach ( var item_ in response_ . Content . Headers )
4630
+ headers_ [ item_ . Key ] = item_ . Value ;
4631
+ }
4632
+
4633
+ ProcessResponse ( client_ , response_ ) ;
4634
+
4635
+ var status_ = ( int ) response_ . StatusCode ;
4636
+ if ( status_ == 200 || status_ == 206 )
4637
+ {
4638
+ var responseStream_ = response_ . Content == null ? System . IO . Stream . Null : await response_ . Content . ReadAsStreamAsync ( ) . ConfigureAwait ( false ) ;
4639
+ var fileResponse_ = new FileResponse ( status_ , headers_ , responseStream_ , null , response_ ) ;
4640
+ disposeClient_ = false ; disposeResponse_ = false ; // response and client are disposed by FileResponse
4641
+ return fileResponse_ ;
4642
+ }
4643
+ else
4644
+ {
4645
+ var responseData_ = response_ . Content == null ? null : await response_ . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
4646
+ throw new ApiException ( "The HTTP status code of the response was not expected (" + status_ + ")." , status_ , responseData_ , headers_ , null ) ;
4647
+ }
4648
+ }
4649
+ finally
4650
+ {
4651
+ if ( disposeResponse_ )
4652
+ response_ . Dispose ( ) ;
4653
+ }
4654
+ }
4655
+ }
4656
+ finally
4657
+ {
4658
+ if ( disposeClient_ )
4659
+ client_ . Dispose ( ) ;
4660
+ }
4661
+ }
4662
+
4663
+ /// <returns>OK</returns>
4664
+ /// <exception cref="ApiException">A server side error occurred.</exception>
4665
+ public virtual System . Threading . Tasks . Task < FileResponse > RenderMarkdownAsync ( string body )
4666
+ {
4667
+ return RenderMarkdownAsync ( body , System . Threading . CancellationToken . None ) ;
4668
+ }
4669
+
4670
+ /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
4671
+ /// <returns>OK</returns>
4672
+ /// <exception cref="ApiException">A server side error occurred.</exception>
4673
+ public virtual async System . Threading . Tasks . Task < FileResponse > RenderMarkdownAsync ( string body , System . Threading . CancellationToken cancellationToken )
4674
+ {
4675
+ var client_ = _httpClient ;
4676
+ var disposeClient_ = false ;
4677
+ try
4678
+ {
4679
+ using ( var request_ = new System . Net . Http . HttpRequestMessage ( ) )
4680
+ {
4681
+ var json_ = Newtonsoft . Json . JsonConvert . SerializeObject ( body , JsonSerializerSettings ) ;
4682
+ var content_ = new System . Net . Http . StringContent ( json_ ) ;
4683
+ content_ . Headers . ContentType = System . Net . Http . Headers . MediaTypeHeaderValue . Parse ( "application/json" ) ;
4684
+ request_ . Content = content_ ;
4685
+ request_ . Method = new System . Net . Http . HttpMethod ( "POST" ) ;
4686
+ request_ . Headers . Accept . Add ( System . Net . Http . Headers . MediaTypeWithQualityHeaderValue . Parse ( "text/html" ) ) ;
4687
+
4688
+ var urlBuilder_ = new System . Text . StringBuilder ( ) ;
4689
+ if ( ! string . IsNullOrEmpty ( _baseUrl ) ) urlBuilder_ . Append ( _baseUrl ) ;
4690
+ // Operation Path: "internal/v1/preview/rendermarkdown"
4691
+ urlBuilder_ . Append ( "internal/v1/preview/rendermarkdown" ) ;
4692
+
4693
+ PrepareRequest ( client_ , request_ , urlBuilder_ ) ;
4694
+
4695
+ var url_ = urlBuilder_ . ToString ( ) ;
4696
+ request_ . RequestUri = new System . Uri ( url_ , System . UriKind . RelativeOrAbsolute ) ;
4697
+
4698
+ PrepareRequest ( client_ , request_ , url_ ) ;
4699
+
4700
+ var response_ = await client_ . SendAsync ( request_ , System . Net . Http . HttpCompletionOption . ResponseHeadersRead , cancellationToken ) . ConfigureAwait ( false ) ;
4701
+ var disposeResponse_ = true ;
4702
+ try
4703
+ {
4704
+ var headers_ = new System . Collections . Generic . Dictionary < string , System . Collections . Generic . IEnumerable < string > > ( ) ;
4705
+ foreach ( var item_ in response_ . Headers )
4706
+ headers_ [ item_ . Key ] = item_ . Value ;
4707
+ if ( response_ . Content != null && response_ . Content . Headers != null )
4708
+ {
4709
+ foreach ( var item_ in response_ . Content . Headers )
4710
+ headers_ [ item_ . Key ] = item_ . Value ;
4711
+ }
4712
+
4713
+ ProcessResponse ( client_ , response_ ) ;
4714
+
4715
+ var status_ = ( int ) response_ . StatusCode ;
4716
+ if ( status_ == 200 || status_ == 206 )
4717
+ {
4718
+ var responseStream_ = response_ . Content == null ? System . IO . Stream . Null : await response_ . Content . ReadAsStreamAsync ( ) . ConfigureAwait ( false ) ;
4719
+ var fileResponse_ = new FileResponse ( status_ , headers_ , responseStream_ , null , response_ ) ;
4720
+ disposeClient_ = false ; disposeResponse_ = false ; // response and client are disposed by FileResponse
4721
+ return fileResponse_ ;
4722
+ }
4723
+ else
4724
+ {
4725
+ var responseData_ = response_ . Content == null ? null : await response_ . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
4726
+ throw new ApiException ( "The HTTP status code of the response was not expected (" + status_ + ")." , status_ , responseData_ , headers_ , null ) ;
4727
+ }
4728
+ }
4729
+ finally
4730
+ {
4731
+ if ( disposeResponse_ )
4732
+ response_ . Dispose ( ) ;
4733
+ }
4734
+ }
4735
+ }
4736
+ finally
4737
+ {
4738
+ if ( disposeClient_ )
4739
+ client_ . Dispose ( ) ;
4740
+ }
4741
+ }
4742
+
4582
4743
/// <summary>
4583
4744
/// Get List of Stored Credentials [Generated]
4584
4745
/// </summary>
@@ -6322,7 +6483,7 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu
6322
6483
6323
6484
6324
6485
6325
- [ System . CodeDom . Compiler . GeneratedCode ( "NSwag" , "14.3 .0.0 (NJsonSchema v11.2.0 .0 (Newtonsoft.Json v13.0.0.0))" ) ]
6486
+ [ System . CodeDom . Compiler . GeneratedCode ( "NSwag" , "14.4 .0.0 (NJsonSchema v11.3.2 .0 (Newtonsoft.Json v13.0.0.0))" ) ]
6326
6487
public partial class FileResponse : System . IDisposable
6327
6488
{
6328
6489
private System . IDisposable _client ;
@@ -6359,7 +6520,7 @@ public void Dispose()
6359
6520
}
6360
6521
6361
6522
6362
- [ System . CodeDom . Compiler . GeneratedCode ( "NSwag" , "14.3 .0.0 (NJsonSchema v11.2.0 .0 (Newtonsoft.Json v13.0.0.0))" ) ]
6523
+ [ System . CodeDom . Compiler . GeneratedCode ( "NSwag" , "14.4 .0.0 (NJsonSchema v11.3.2 .0 (Newtonsoft.Json v13.0.0.0))" ) ]
6363
6524
public partial class ApiException : System . Exception
6364
6525
{
6365
6526
public int StatusCode { get ; private set ; }
@@ -6382,7 +6543,7 @@ public override string ToString()
6382
6543
}
6383
6544
}
6384
6545
6385
- [ System . CodeDom . Compiler . GeneratedCode ( "NSwag" , "14.3 .0.0 (NJsonSchema v11.2.0 .0 (Newtonsoft.Json v13.0.0.0))" ) ]
6546
+ [ System . CodeDom . Compiler . GeneratedCode ( "NSwag" , "14.4 .0.0 (NJsonSchema v11.3.2 .0 (Newtonsoft.Json v13.0.0.0))" ) ]
6386
6547
public partial class ApiException < TResult > : ApiException
6387
6548
{
6388
6549
public TResult Result { get ; private set ; }
0 commit comments