@diplodoc/cli-tests 5.16.4 → 5.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -850,6 +850,8 @@ paths:
|
|
|
850
850
|
$ref: '#/components/schemas/RecurceTop'
|
|
851
851
|
components:
|
|
852
852
|
schemas:
|
|
853
|
+
ResolvingCaseChild:
|
|
854
|
+
description: '%%%9%%%'
|
|
853
855
|
RecurceTop:
|
|
854
856
|
type: object
|
|
855
857
|
properties:
|
|
@@ -867,6 +869,12 @@ components:
|
|
|
867
869
|
type: array
|
|
868
870
|
items:
|
|
869
871
|
$ref: '#/components/schemas/RecurceTop'
|
|
872
|
+
ResolvingCase:
|
|
873
|
+
type: object
|
|
874
|
+
properties:
|
|
875
|
+
withrefprop:
|
|
876
|
+
description: Parent description
|
|
877
|
+
$ref: '#/components/schemas/ResolvingCaseChild'
|
|
870
878
|
"
|
|
871
879
|
`;
|
|
872
880
|
|
|
@@ -907,6 +915,9 @@ exports[`Translate command > extract openapi spec files 2`] = `
|
|
|
907
915
|
<trans-unit id="8">
|
|
908
916
|
<source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-5"/>PROCESSED<x ctype="code_close" equiv-text="\`" id="x-6"/> — загрузка успешно обработана.</source>
|
|
909
917
|
</trans-unit>
|
|
918
|
+
<trans-unit id="9">
|
|
919
|
+
<source xml:space="preserve">Child description</source>
|
|
920
|
+
</trans-unit>
|
|
910
921
|
</body>
|
|
911
922
|
</file>
|
|
912
923
|
</xliff>"
|
|
@@ -942,7 +953,7 @@ exports[`Translate command > extract openapi spec files 4`] = `
|
|
|
942
953
|
</xliff>"
|
|
943
954
|
`;
|
|
944
955
|
|
|
945
|
-
exports[`Translate command > extract openapi spec files with
|
|
956
|
+
exports[`Translate command > extract openapi spec files with --no-ref-resolve option > filelist 1`] = `
|
|
946
957
|
"[
|
|
947
958
|
"openapi-spec.yaml.skl",
|
|
948
959
|
"openapi-spec.yaml.xliff",
|
|
@@ -951,6 +962,137 @@ exports[`Translate command > extract openapi spec files with custom openapi sche
|
|
|
951
962
|
]"
|
|
952
963
|
`;
|
|
953
964
|
|
|
965
|
+
exports[`Translate command > extract openapi spec files with --no-ref-resolve option 1`] = `
|
|
966
|
+
"openapi: 3.0.1
|
|
967
|
+
info:
|
|
968
|
+
title: '%%%0%%%'
|
|
969
|
+
version: v0
|
|
970
|
+
servers:
|
|
971
|
+
- url: http://localhost:8080
|
|
972
|
+
description: '%%%1%%%'
|
|
973
|
+
paths:
|
|
974
|
+
/test:
|
|
975
|
+
get:
|
|
976
|
+
tags:
|
|
977
|
+
- test-controller
|
|
978
|
+
summary: '%%%2%%%'
|
|
979
|
+
description: '%%%3%%%'
|
|
980
|
+
operationId: getWithPayloadResponse
|
|
981
|
+
responses:
|
|
982
|
+
'200':
|
|
983
|
+
description: '%%%4%%%'
|
|
984
|
+
content:
|
|
985
|
+
application/json:
|
|
986
|
+
schema:
|
|
987
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
988
|
+
components:
|
|
989
|
+
schemas:
|
|
990
|
+
ResolvingCaseChild:
|
|
991
|
+
description: '%%%5%%%'
|
|
992
|
+
RecurceTop:
|
|
993
|
+
type: object
|
|
994
|
+
properties:
|
|
995
|
+
A:
|
|
996
|
+
type: string
|
|
997
|
+
description: |
|
|
998
|
+
%%%6%%%
|
|
999
|
+
- %%%7%%%
|
|
1000
|
+
- %%%8%%%
|
|
1001
|
+
- %%%9%%%
|
|
1002
|
+
RecurceMiddle:
|
|
1003
|
+
type: object
|
|
1004
|
+
properties:
|
|
1005
|
+
B:
|
|
1006
|
+
type: array
|
|
1007
|
+
items:
|
|
1008
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
1009
|
+
ResolvingCase:
|
|
1010
|
+
type: object
|
|
1011
|
+
properties:
|
|
1012
|
+
withrefprop:
|
|
1013
|
+
description: '%%%10%%%'
|
|
1014
|
+
$ref: '#/components/schemas/ResolvingCaseChild'
|
|
1015
|
+
"
|
|
1016
|
+
`;
|
|
1017
|
+
|
|
1018
|
+
exports[`Translate command > extract openapi spec files with --no-ref-resolve option 2`] = `
|
|
1019
|
+
"<?xml version="1.0" encoding="UTF-8"?>
|
|
1020
|
+
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
|
1021
|
+
<file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
|
|
1022
|
+
<header>
|
|
1023
|
+
<skeleton>
|
|
1024
|
+
<external-file href="file.skl"></external-file>
|
|
1025
|
+
</skeleton>
|
|
1026
|
+
</header>
|
|
1027
|
+
<body>
|
|
1028
|
+
<trans-unit id="0">
|
|
1029
|
+
<source xml:space="preserve">OpenAPI definition</source>
|
|
1030
|
+
</trans-unit>
|
|
1031
|
+
<trans-unit id="1">
|
|
1032
|
+
<source xml:space="preserve">Generated server url</source>
|
|
1033
|
+
</trans-unit>
|
|
1034
|
+
<trans-unit id="2">
|
|
1035
|
+
<source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
|
|
1036
|
+
</trans-unit>
|
|
1037
|
+
<trans-unit id="3">
|
|
1038
|
+
<source xml:space="preserve">Defines a simple get operation with no inputs and a complex</source>
|
|
1039
|
+
</trans-unit>
|
|
1040
|
+
<trans-unit id="4">
|
|
1041
|
+
<source xml:space="preserve">200!!!!</source>
|
|
1042
|
+
</trans-unit>
|
|
1043
|
+
<trans-unit id="5">
|
|
1044
|
+
<source xml:space="preserve">Child description</source>
|
|
1045
|
+
</trans-unit>
|
|
1046
|
+
<trans-unit id="6">
|
|
1047
|
+
<source xml:space="preserve">Статус загрузки:</source>
|
|
1048
|
+
</trans-unit>
|
|
1049
|
+
<trans-unit id="7">
|
|
1050
|
+
<source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-1"/>UPLOADED<x ctype="code_close" equiv-text="\`" id="x-2"/> — загрузка завершена.</source>
|
|
1051
|
+
</trans-unit>
|
|
1052
|
+
<trans-unit id="8">
|
|
1053
|
+
<source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-3"/>IN_PROGRESS<x ctype="code_close" equiv-text="\`" id="x-4"/> — загрузка находится в процессе обработки.</source>
|
|
1054
|
+
</trans-unit>
|
|
1055
|
+
<trans-unit id="9">
|
|
1056
|
+
<source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-5"/>PROCESSED<x ctype="code_close" equiv-text="\`" id="x-6"/> — загрузка успешно обработана.</source>
|
|
1057
|
+
</trans-unit>
|
|
1058
|
+
<trans-unit id="10">
|
|
1059
|
+
<source xml:space="preserve">Parent description</source>
|
|
1060
|
+
</trans-unit>
|
|
1061
|
+
</body>
|
|
1062
|
+
</file>
|
|
1063
|
+
</xliff>"
|
|
1064
|
+
`;
|
|
1065
|
+
|
|
1066
|
+
exports[`Translate command > extract openapi spec files with --no-ref-resolve option 3`] = `
|
|
1067
|
+
"items:
|
|
1068
|
+
- name: '%%%0%%%'
|
|
1069
|
+
include:
|
|
1070
|
+
path: openapi
|
|
1071
|
+
includers:
|
|
1072
|
+
- name: openapi
|
|
1073
|
+
input: openapi-spec.yaml
|
|
1074
|
+
mode: link
|
|
1075
|
+
"
|
|
1076
|
+
`;
|
|
1077
|
+
|
|
1078
|
+
exports[`Translate command > extract openapi spec files with --no-ref-resolve option 4`] = `
|
|
1079
|
+
"<?xml version="1.0" encoding="UTF-8"?>
|
|
1080
|
+
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
|
1081
|
+
<file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
|
|
1082
|
+
<header>
|
|
1083
|
+
<skeleton>
|
|
1084
|
+
<external-file href="file.skl"></external-file>
|
|
1085
|
+
</skeleton>
|
|
1086
|
+
</header>
|
|
1087
|
+
<body>
|
|
1088
|
+
<trans-unit id="0">
|
|
1089
|
+
<source xml:space="preserve">openapi</source>
|
|
1090
|
+
</trans-unit>
|
|
1091
|
+
</body>
|
|
1092
|
+
</file>
|
|
1093
|
+
</xliff>"
|
|
1094
|
+
`;
|
|
1095
|
+
|
|
954
1096
|
exports[`Translate command > extract openapi spec files with custom openapi schema provided 1`] = `
|
|
955
1097
|
"openapi: 3.0.1
|
|
956
1098
|
info:
|
|
@@ -976,6 +1118,8 @@ paths:
|
|
|
976
1118
|
$ref: '#/components/schemas/RecurceTop'
|
|
977
1119
|
components:
|
|
978
1120
|
schemas:
|
|
1121
|
+
ResolvingCaseChild:
|
|
1122
|
+
description: '%%%10%%%'
|
|
979
1123
|
RecurceTop:
|
|
980
1124
|
type: object
|
|
981
1125
|
properties:
|
|
@@ -993,6 +1137,12 @@ components:
|
|
|
993
1137
|
type: array
|
|
994
1138
|
items:
|
|
995
1139
|
$ref: '#/components/schemas/RecurceTop'
|
|
1140
|
+
ResolvingCase:
|
|
1141
|
+
type: object
|
|
1142
|
+
properties:
|
|
1143
|
+
withrefprop:
|
|
1144
|
+
description: Parent description
|
|
1145
|
+
$ref: '#/components/schemas/ResolvingCaseChild'
|
|
996
1146
|
"
|
|
997
1147
|
`;
|
|
998
1148
|
|
|
@@ -1036,6 +1186,9 @@ exports[`Translate command > extract openapi spec files with custom openapi sche
|
|
|
1036
1186
|
<trans-unit id="9">
|
|
1037
1187
|
<source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-5"/>PROCESSED<x ctype="code_close" equiv-text="\`" id="x-6"/> — загрузка успешно обработана.</source>
|
|
1038
1188
|
</trans-unit>
|
|
1189
|
+
<trans-unit id="10">
|
|
1190
|
+
<source xml:space="preserve">Child description</source>
|
|
1191
|
+
</trans-unit>
|
|
1039
1192
|
</body>
|
|
1040
1193
|
</file>
|
|
1041
1194
|
</xliff>"
|
package/e2e/preprocess.test.ts
CHANGED
|
@@ -12,7 +12,7 @@ const generateFilesYamlTestTemplate = (
|
|
|
12
12
|
await TestAdapter.testBuildPass(inputPath, outputPath, {
|
|
13
13
|
md2md: true,
|
|
14
14
|
md2html: false,
|
|
15
|
-
args: args.join(' '),
|
|
15
|
+
args: args.concat(['--keep-not-var']).join(' '),
|
|
16
16
|
});
|
|
17
17
|
await TestAdapter.testBuildPass(outputPath, outputPath + '-html', {
|
|
18
18
|
md2md: false,
|
package/e2e/regression.test.ts
CHANGED
|
@@ -10,7 +10,7 @@ function test(_description: string) {
|
|
|
10
10
|
await TestAdapter.testBuildPass(inputPath, outputPath, {
|
|
11
11
|
md2md: true,
|
|
12
12
|
md2html: false,
|
|
13
|
-
args: '-j2',
|
|
13
|
+
args: '-j2 --keep-not-var',
|
|
14
14
|
});
|
|
15
15
|
await TestAdapter.testBuildPass(outputPath, outputPath + '-html', {
|
|
16
16
|
md2md: false,
|
package/e2e/translation.spec.ts
CHANGED
|
@@ -69,6 +69,17 @@ describe('Translate command', () => {
|
|
|
69
69
|
target: 'es-ES',
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
+
generateFilesYamlTestTemplate(
|
|
73
|
+
'extract openapi spec files with --no-ref-resolve option',
|
|
74
|
+
'mocks/translation/openapi',
|
|
75
|
+
{
|
|
76
|
+
subcommand: 'extract',
|
|
77
|
+
source: 'ru-RU',
|
|
78
|
+
target: 'es-ES',
|
|
79
|
+
additionalArgs: '--no-ref-resolve',
|
|
80
|
+
},
|
|
81
|
+
);
|
|
82
|
+
|
|
72
83
|
generateMapTestTemplate(
|
|
73
84
|
'extract openapi spec files with custom openapi schema provided',
|
|
74
85
|
'mocks/translation/openapi',
|
|
@@ -22,6 +22,8 @@ paths:
|
|
|
22
22
|
$ref: '#/components/schemas/RecurceTop'
|
|
23
23
|
components:
|
|
24
24
|
schemas:
|
|
25
|
+
ResolvingCaseChild:
|
|
26
|
+
description: Child description
|
|
25
27
|
RecurceTop:
|
|
26
28
|
type: object
|
|
27
29
|
properties:
|
|
@@ -40,3 +42,9 @@ components:
|
|
|
40
42
|
type: array
|
|
41
43
|
items:
|
|
42
44
|
$ref: '#/components/schemas/RecurceTop'
|
|
45
|
+
ResolvingCase:
|
|
46
|
+
type: object
|
|
47
|
+
properties:
|
|
48
|
+
withrefprop:
|
|
49
|
+
description: Parent description
|
|
50
|
+
$ref: '#/components/schemas/ResolvingCaseChild'
|