TestMergeInfo Story-Info link
MergeInfo
MergeJSONAddNotReplaceInfo AddNotReplace - see comment (4ms) link
✓ 1. GIVEN Original Swagger Is File "Data/simple.json" (1ms)
✓ 2. THEN Swagger Info Have The Following [title: "testToBeDeleted"] [desc: "<null>"] [version: "1.0"] (<1ms)
✓ 3. GIVE Merge With Info From File "Data/mergeInfo2" (<1ms)
✓ 4. THEN Swagger Info Have The Following [title: "testToBeDeleted"] [desc: "newDescription"] [version: "1.0"] (<1ms)
MergeJSONUpsertInfo Upsert - see comment (148ms) link
✓ 1. GIVEN Original Swagger Is File "Data/simple.json" (93ms)
✓ 2. THEN Swagger Info Have The Following [title: "testToBeDeleted"] [desc: "<null>"] [version: "1.0"] (21ms)
✓ 3. GIVE Merge With Info From File "Data/mergeInfo1" (7ms)
✓ 4. THEN Swagger Info Have The Following [title: "newTest"] [desc: "newDescription"] [version: "2.0"] (<1ms)
Comments:
// Step 2: Info{"Title":"testToBeDeleted","Description":null,"Version":"1.0","TermsOfService":null,"Contact":null,"License":null,"Extensions":{}}
// Step 3: merged with {
"HowToMerge": "upsert",
"data": {
"title": "newTest",
"version": "2.0",
"description": "newDescription"
}
}
// Step 4: Info{"Title":"newTest","Description":"newDescription","Version":"2.0","TermsOfService":null,"Contact":null,"License":null,"Extensions":{}}
Comments:
// Step 2: Info{"Title":"testToBeDeleted","Description":null,"Version":"1.0","TermsOfService":null,"Contact":null,"License":null,"Extensions":{}}
// Step 3: merged with { "HowToMerge": "AddNotReplace", "data": { "title": "newTest", "version": "2.0", "description": "newDescription" } }
// Step 4: Info{"Title":"testToBeDeleted","Description":"newDescription","Version":"1.0","TermsOfService":null,"Contact":null,"License":null,"Extensions":{}}