@@ -15,28 +15,28 @@ public class OAOperation
15
15
public bool Deprecated ;
16
16
//public IDictionary<string, OpenApiCallback> Callbacks;
17
17
//public OpenApiResponses Responses;
18
- // public OpenApiRequestBody RequestBody;
18
+ public OARequestBody RequestBody ;
19
19
public List < OAParameter > Parameters ;
20
20
public List < ParameterValue > ParametersValues ;
21
- // public OpenApiExternalDocs ExternalDocs;
21
+ public OAExternalDocs ExternalDocs ;
22
22
public string Description ;
23
23
public string Summary ;
24
24
public List < OATag > Tags ;
25
25
public List < OAServer > Servers ;
26
26
public PathItemAsset pathAsset ;
27
27
28
- public OAOperation ( OperationType operationType , OpenApiOperation openApiOperation , PathItemAsset pathItemAsset )
28
+ public OAOperation ( OperationType operationType , OpenApiOperation op , PathItemAsset pathItemAsset )
29
29
{
30
30
pathAsset = pathItemAsset ;
31
- OperationId = openApiOperation . OperationId ;
31
+ OperationId = op . OperationId ;
32
32
OperationType = ( AOOperationType ) operationType ;
33
- Summary = openApiOperation . Summary ;
34
- Description = openApiOperation . Description ;
35
- Deprecated = openApiOperation . Deprecated ;
33
+ Summary = op . Summary ;
34
+ Description = op . Description ;
35
+ Deprecated = op . Deprecated ;
36
36
37
- if ( openApiOperation . Parameters . Count > 0 )
37
+ if ( op . Parameters . Count > 0 )
38
38
{
39
- Parameters = openApiOperation . Parameters . Select ( p => new OAParameter ( p ) ) . ToList ( ) ;
39
+ Parameters = op . Parameters . Select ( p => new OAParameter ( p ) ) . ToList ( ) ;
40
40
}
41
41
else
42
42
{
@@ -45,9 +45,13 @@ public OAOperation(OperationType operationType, OpenApiOperation openApiOperatio
45
45
46
46
ParametersValues = Parameters . Select ( p => new ParameterValue { parameter = p } ) . ToList ( ) ;
47
47
48
- Servers = openApiOperation . Servers . Select ( s => new OAServer ( s ) ) . ToList ( ) ;
48
+ Servers = op . Servers . Select ( s => new OAServer ( s ) ) . ToList ( ) ;
49
49
50
- Tags = openApiOperation . Tags . Select ( t => new OATag ( t ) ) . ToList ( ) ;
50
+ Tags = op . Tags . Select ( t => new OATag ( t ) ) . ToList ( ) ;
51
+
52
+ RequestBody = new OARequestBody ( op . RequestBody ) ;
53
+
54
+ ExternalDocs = new OAExternalDocs ( op . ExternalDocs ) ;
51
55
}
52
56
53
57
public void SetParameterValue ( string parameterName , string val )
@@ -59,5 +63,10 @@ public void SetParameterValue(string parameterName, string val)
59
63
}
60
64
parVal . value = val ;
61
65
}
66
+
67
+ public void SetRequestBody ( string body )
68
+ {
69
+ RequestBody . LastRequestBody = body ;
70
+ }
62
71
}
63
72
}
0 commit comments