@@ -237,7 +237,7 @@ func TestArazzo_RoundTrip_Success(t *testing.T) {
237
237
}
238
238
239
239
func TestArazzoUnmarshal_ValidationErrors (t * testing.T ) {
240
- data := []byte (`arazzo: 1.0.1
240
+ data := []byte (`arazzo: 1.0.2
241
241
x-test: some-value
242
242
info:
243
243
title: My Workflow
@@ -254,14 +254,14 @@ sourceDescriptions:
254
254
255
255
assert .Equal (t , []error {
256
256
& validation.Error {Line : 1 , Column : 1 , Message : "field workflows is missing" },
257
- & validation.Error {Line : 1 , Column : 9 , Message : "Arazzo version must be 1.0.0 " },
257
+ & validation.Error {Line : 1 , Column : 9 , Message : "Only Arazzo version 1.0.1 and below is supported " },
258
258
& validation.Error {Line : 4 , Column : 3 , Message : "field version is missing" },
259
259
& validation.Error {Line : 6 , Column : 5 , Message : "field url is missing" },
260
260
& validation.Error {Line : 7 , Column : 11 , Message : "type must be one of [openapi, arazzo]" },
261
261
}, validationErrs )
262
262
263
263
expected := & arazzo.Arazzo {
264
- Arazzo : "1.0.1 " ,
264
+ Arazzo : "1.0.2 " ,
265
265
Info : arazzo.Info {
266
266
Title : "My Workflow" ,
267
267
Version : "" ,
@@ -307,6 +307,7 @@ func TestArazzo_Mutate_Success(t *testing.T) {
307
307
require .NoError (t , err )
308
308
require .Empty (t , validationErrs )
309
309
310
+ a .Arazzo = "1.0.0"
310
311
a .Info .Title = "My updated workflow title"
311
312
sd := a .SourceDescriptions [0 ]
312
313
sd .Extensions .Set ("x-test" , yml .CreateOrUpdateScalarNode (ctx , "some-value" , nil ))
@@ -478,53 +479,49 @@ var stressTests = []struct {
478
479
{
479
480
name : "Redocly Museum API" ,
480
481
args : args {
481
- location : "https://raw.githubusercontent.com/Redocly/museum-openapi-example/091a853a0d2467bc4c65bb6f615a33d0a7201747/arazzo/museum-api.arazzo.yaml" ,
482
- validationIgnores : []string {
483
- "invalid jsonpath expression" , // they have criterion marked as jsonpath but uses a simple condition instead
484
- },
482
+ location : "https://raw.githubusercontent.com/Redocly/museum-openapi-example/2770b2b2e59832d245c7b0eb0badf6568d7efb53/arazzo/museum-api.arazzo.yaml" ,
485
483
},
486
484
wantTitle : "Redocly Museum API Test Workflow" ,
487
485
},
488
486
{
489
487
name : "Redocly Museum Tickets" ,
490
488
args : args {
491
- location : "https://raw.githubusercontent.com/Redocly/museum-openapi-example/091a853a0d2467bc4c65bb6f615a33d0a7201747 /arazzo/museum-tickets.arazzo.yaml" ,
489
+ location : "https://raw.githubusercontent.com/Redocly/museum-openapi-example/2770b2b2e59832d245c7b0eb0badf6568d7efb53 /arazzo/museum-tickets.arazzo.yaml" ,
492
490
},
493
491
wantTitle : "Redocly Museum Tickets Workflow" ,
494
492
},
495
493
{
496
494
name : "Redocly Warp API" ,
497
495
args : args {
498
- // TODO line 25 report inconsistency with spec and value
499
- location : "https://raw.githubusercontent.com/Redocly/warp-single-sidebar/be5f885db3cdd9c595f9a7e724c04e9f6a0b70dd/apis/arazzo.yaml" ,
496
+ location : "https://raw.githubusercontent.com/Redocly/warp-single-sidebar/b78fc09da52d7755e92e1bc8f990edd37421cbde/apis/arazzo.yaml" ,
500
497
},
501
498
wantTitle : "Warp API" ,
502
499
},
503
500
{
504
501
name : "Arazzo Extended Parameters Example" ,
505
502
args : args {
506
- location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/977f586da14b65bd8e612b763267b8b728749e52 /examples/1.0.0/ExtendedParametersExample.arazzo.yaml" ,
503
+ location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/23852b8b0d13ab1e3288a57a990611ffed45ab5d /examples/1.0.0/ExtendedParametersExample.arazzo.yaml" ,
507
504
},
508
505
wantTitle : "Public Zoo API" ,
509
506
},
510
507
{
511
508
name : "Arazzo FAPI-PAR Example" ,
512
509
args : args {
513
- location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/977f586da14b65bd8e612b763267b8b728749e52 /examples/1.0.0/FAPI-PAR.arazzo.yaml" ,
510
+ location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/23852b8b0d13ab1e3288a57a990611ffed45ab5d /examples/1.0.0/FAPI-PAR.arazzo.yaml" ,
514
511
},
515
512
wantTitle : "PAR, Authorization and Token workflow" ,
516
513
},
517
514
{
518
515
name : "Arazzo Login and Retrieve Pets Example" ,
519
516
args : args {
520
- location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/977f586da14b65bd8e612b763267b8b728749e52 /examples/1.0.0/LoginAndRetrievePets.arazzo.yaml" ,
517
+ location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/23852b8b0d13ab1e3288a57a990611ffed45ab5d /examples/1.0.0/LoginAndRetrievePets.arazzo.yaml" ,
521
518
},
522
519
wantTitle : "A pet purchasing workflow" ,
523
520
},
524
521
{
525
522
name : "Arazzo BNPL Example" ,
526
523
args : args {
527
- location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/977f586da14b65bd8e612b763267b8b728749e52 /examples/1.0.0/bnpl-arazzo.yaml" ,
524
+ location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/23852b8b0d13ab1e3288a57a990611ffed45ab5d /examples/1.0.0/bnpl-arazzo.yaml" ,
528
525
validationIgnores : []string {
529
526
"$response.headers.Location" , // doc should be referencing `$response.header.Location`
530
527
},
@@ -534,18 +531,14 @@ var stressTests = []struct {
534
531
{
535
532
name : "Arazzo OAuth Example" ,
536
533
args : args {
537
- location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/977f586da14b65bd8e612b763267b8b728749e52 /examples/1.0.0/oauth.arazzo.yaml" ,
534
+ location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/23852b8b0d13ab1e3288a57a990611ffed45ab5d /examples/1.0.0/oauth.arazzo.yaml" ,
538
535
},
539
536
wantTitle : "Example OAuth service" ,
540
537
},
541
538
{
542
539
name : "Arazzo Pet Coupons Example" ,
543
540
args : args {
544
- location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/977f586da14b65bd8e612b763267b8b728749e52/examples/1.0.0/pet-coupons.arazzo.yaml" ,
545
- validationIgnores : []string {
546
- "$outputs[0]" , // legit issue trying to reference outputs by index
547
- "$workflow_order_id" , // legit issue trying to reference workflow_order_id
548
- },
541
+ location : "https://raw.githubusercontent.com/OAI/Arazzo-Specification/23852b8b0d13ab1e3288a57a990611ffed45ab5d/examples/1.0.0/pet-coupons.arazzo.yaml" ,
549
542
},
550
543
wantTitle : "Petstore - Apply Coupons" ,
551
544
},
@@ -582,7 +575,7 @@ var stressTests = []struct {
582
575
{
583
576
name : "Itarazzo Client Pet Store Example" ,
584
577
args : args {
585
- location : "https://raw.githubusercontent.com/leidenheit/itarazzo-client/b744ca1ca3a036964ae30be601f10a25b14dc52d /src/test/resources/pet-store.arazzo.yaml" ,
578
+ location : "https://raw.githubusercontent.com/leidenheit/itarazzo-client/b3c126d28bf80ae7d74861c08509be33b83c5ddf /src/test/resources/pet-store.arazzo.yaml" ,
586
579
validationIgnores : []string {
587
580
"jsonpointer must start with /: $.status" , // legit issues TODO: improve the error returned as it is wrong
588
581
"jsonpointer must start with /: $.id" , // legit issues TODO: improve the error returned as it is wrong
@@ -593,15 +586,14 @@ var stressTests = []struct {
593
586
{
594
587
name : "Ritza build-a-bot workflow" ,
595
588
args : args {
596
- location : "https://raw.githubusercontent.com/ritza-co/e2e-testing-arazzo/c0615c3708a1e4c0fcaeb79edae78ddc4eb5ba82/arazzo.yaml" ,
597
- validationIgnores : []string {},
589
+ location : "https://raw.githubusercontent.com/ritza-co/e2e-testing-arazzo/c0615c3708a1e4c0fcaeb79edae78ddc4eb5ba82/arazzo.yaml" ,
598
590
},
599
591
wantTitle : "Build-a-Bot Workflow" ,
600
592
},
601
593
{
602
594
name : " API-Flows adyen-giving workflow" ,
603
595
args : args {
604
- location : "https://raw.githubusercontent.com/API-Flows/openapi-workflow-registry/3d85d79232fa8f42993b2f5bd47e273b9369dc2d /root/adyen/adyen-giving.yaml" ,
596
+ location : "https://raw.githubusercontent.com/API-Flows/openapi-workflow-registry/75c237ce1b155ba9f8dc7f065759df7ae1cbbbe5 /root/adyen/adyen-giving.yaml" ,
605
597
validationIgnores : []string {
606
598
"in must be one of [path, query, header, cookie] but was body" ,
607
599
},
@@ -611,16 +603,15 @@ var stressTests = []struct {
611
603
{
612
604
name : "API-Flows simple workflow" ,
613
605
args : args {
614
- location : "https://raw.githubusercontent.com/API-Flows/openapi-workflow-parser/6b28ba4def262969c5a96bc54d08433e6c336643/src/test/resources/1.0.0/simple.workflow.yaml" ,
615
- validationIgnores : []string {},
606
+ location : "https://raw.githubusercontent.com/API-Flows/openapi-workflow-parser/6b28ba4def262969c5a96bc54d08433e6c336643/src/test/resources/1.0.0/simple.workflow.yaml" ,
616
607
},
617
608
wantTitle : "simple" ,
618
609
},
619
610
// Disabled for now as it is currently failing round tripping due to missing conditions
620
611
// {
621
612
// name: "Kartikhub swap tokens workflow",
622
613
// args: args{
623
- // location: "https://raw.githubusercontent.com/Kartikhub/web3-basics/d95bc51bb935ef07d627e52c6fdfe18aaea69e18 /swap-react/docs/swap-transaction-arazzo.yaml",
614
+ // location: "https://raw.githubusercontent.com/Kartikhub/web3-basics/be13fa7e6fdf386eef08bba2843d4a8b615561b9 /swap-react/docs/swap-transaction-arazzo.yaml",
624
615
// validationIgnores: []string{ // All valid issues
625
616
// "field condition is missing",
626
617
// "condition is required",
0 commit comments