Skip to content

Conflicting context length validation in tenant specific API Products. #5137

Description

@Menuka-Senevirathne

Description

As mentioned in the $subject, context validation fails with the below error when trying to update an API Product for a tenant. Please check the reproducing steps for more details.

{
    "code": 400,
    "message": "Bad Request",
    "description": "Validation Error",
    "moreInfo": "",
    "error": [
        {
            "code": "400_context",
            "message": "context: size must be between 1 and 60",
            "description": null
        }
    ]
}

Steps to Reproduce

  • Create a tenant.
  • Log into that tenant and create two or more APIs.
  • Then create an API Product. Most importantly make sure to add a context which has closer to 60 characters (not above). [Example: testing/context/morethan60characters/testingmorethan60]
Image
  • Then add preferred resources and create the API Product.
  • The tenant domain will be appended to the API Product with a t once after creation. [Example: /t/test.com/testing/context/morethan60characters/testingmorethan60]
Image

As you can see now the character length of the context has exceeded 60.

  • Now try to update any field in the Product such as Business Info and the above error will appear.

Version

4.2.0

Environment Details (with versions)

No response

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions