Skip to content

Commit 65d08bd

Browse files
committed
Add schema
1 parent df55e72 commit 65d08bd

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

ApiCodeGenerator.OpenApi.Refit/RefitCodeGeneratorSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public RefitCodeGeneratorSettings()
6666
public bool AuthorizationHeaderParameter { get; set; }
6767

6868
/// <summary>
69-
/// Тип используемый для двоичного содержиого.
69+
/// Тип используемый для двоичного содержимого.
7070
/// </summary>
7171
public string BinaryPartType { get; set; } = "StreamPart";
7272
}

schemas/nswag.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"allOf": [
4+
{
5+
"$ref": "https://raw.githubusercontent.com/MobileTeleSystems/ApiCodeGenerator/refs/heads/dev/schemas/nswag.json#/definitions/nswagDocument"
6+
},
7+
{
8+
"properties": {
9+
"codeGenerators": {
10+
"oneOf": [
11+
{
12+
"$ref": "#/definitions/openApiToRefit"
13+
},
14+
{
15+
"$ref": "https://raw.githubusercontent.com/MobileTeleSystems/ApiCodeGenerator/refs/heads/master/schemas/nswag.json#/definitions/codeGenerators"
16+
}
17+
]
18+
}
19+
}
20+
}
21+
],
22+
"definitions": {
23+
"openApiToRefit": {
24+
"additionalProperties": false,
25+
"properties": {
26+
"openApiToRefitClient": {
27+
"description": "Generates a client description for the Refit library",
28+
"$ref": "#/definitions/refitGeneratorSettings"
29+
}
30+
},
31+
"required": [
32+
"openApiToRefitClient"
33+
]
34+
},
35+
"refitGeneratorSettings": {
36+
"anyOf": [
37+
{
38+
"$ref": "https://raw.githubusercontent.com/MobileTeleSystems/ApiCodeGenerator/refs/heads/master/schemas/nswag.json#/definitions/csGeneratorBaseSettings"
39+
},
40+
{
41+
"properties": {
42+
"clientBaseInterface": {
43+
"type": "boolean",
44+
"description": "The full name of the base interface."
45+
},
46+
"interfaceAccessModifier": {
47+
"type": "string",
48+
"description": "The client interface access modifier (default: public).",
49+
"default": "public"
50+
},
51+
"operationAsyncSuffix": {
52+
"type": "boolean",
53+
"description": "Value indicating whether to append 'Async' suffix to the method name."
54+
},
55+
"operationCancelationToken": {
56+
"type": "boolean",
57+
"description": "Value indicating whether to add the cancellation token to the parameter list."
58+
},
59+
"pathExtractExpression": {
60+
"type": "string",
61+
"description": "The Regular expression for getting the operation path."
62+
},
63+
"wrapQueryParmetersMethods": {
64+
"type": "array",
65+
"description": "The list of methods where query parameters are wrapped (\"ControllerName.MethodName\", '*' may be used).",
66+
"items": {
67+
"type": "string"
68+
}
69+
},
70+
"authorizationHeaderParameter": {
71+
"type": "boolean",
72+
"description": "Value indicating whether to add the authorization header to the parameter list."
73+
},
74+
"binaryPartType": {
75+
"type": "string",
76+
"description": "The .NET type used for binary data (default: StreamPart).",
77+
"default": "StreamPart"
78+
}
79+
}
80+
}
81+
]
82+
}
83+
}
84+
}

0 commit comments

Comments
 (0)