diff --git a/functions/openapi/examples_test.go b/functions/openapi/examples_test.go index fd20d7e8..7a7b5b46 100644 --- a/functions/openapi/examples_test.go +++ b/functions/openapi/examples_test.go @@ -266,7 +266,7 @@ func TestExamples_RunRule_Fail_Inline_Schema_Missing_Summary(t *testing.T) { res := def.RunRule(nodes, ctx) assert.Len(t, res, 1) - assert.Equal(t, "Example `lime` missing a `summary`, examples need explaining", res[0].Message) + assert.Equal(t, "Example `lime` missing a `summary` - examples need explaining", res[0].Message) assert.NotNil(t, res[0].Path) } @@ -679,6 +679,6 @@ func TestExamples_RunRule_Fail_ExternalAndValue(t *testing.T) { res := def.RunRule(nodes, ctx) assert.Len(t, res, 1) - assert.Equal(t, "Example `lemon` is not valid: cannot use both `value` and `externalValue`, choose one or the other", res[0].Message) + assert.Equal(t, "Example `lemon` is not valid: cannot use both `value` and `externalValue` - choose one or the other", res[0].Message) assert.NotNil(t, res[0].Path) } diff --git a/functions/openapi/operation_descriptions_test.go b/functions/openapi/operation_descriptions_test.go index 3c97db9b..67b8ff98 100644 --- a/functions/openapi/operation_descriptions_test.go +++ b/functions/openapi/operation_descriptions_test.go @@ -113,7 +113,7 @@ func TestOperationDescription_CheckRequestBodyDescriptionExists(t *testing.T) { assert.Len(t, res, 1) assert.NotNil(t, res[0].Path) - assert.Equal(t, "Operation requestBody `post` at path `/fish/paste` is missing a description", res[0].Message) + assert.Equal(t, "Operation `requestBody` for method `post` at path `/fish/paste` is missing a description", res[0].Message) } @@ -148,7 +148,7 @@ func TestOperationDescription_CheckRequestBodyDescriptionMeetsLength(t *testing. assert.Len(t, res, 1) assert.NotNil(t, res[0].Path) - assert.Equal(t, "Operation `post` requestBody description at path `/fish/paste` must be at least 5 words "+ + assert.Equal(t, "Operation `requestBody` for method `post` description at path `/fish/paste` must be at least 5 words "+ "long, (4 is not enough)", res[0].Message) } diff --git a/functions/openapi/success_response_test.go b/functions/openapi/success_response_test.go index 9dc86a14..c9af66b3 100644 --- a/functions/openapi/success_response_test.go +++ b/functions/openapi/success_response_test.go @@ -61,7 +61,7 @@ paths: res := def.RunRule(rootNode.Content, ctx) assert.Len(t, res, 1) - assert.Equal(t, "Operation `fresh` must define at least a single 2xx or 3xx response", res[0].Message) + assert.Equal(t, "Operation `fresh` must define at least a single `2xx` or `3xx` response", res[0].Message) } @@ -89,7 +89,7 @@ paths: assert.Len(t, res, 1) assert.Equal(t, "Operation `undefined operation (no operationId)` must define at least a"+ - " single 2xx or 3xx response", res[0].Message) + " single `2xx` or `3xx` response", res[0].Message) }