Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex/value ranges (and other item properties) don't show for lists of items #2516

Open
tasn opened this issue Apr 18, 2024 · 0 comments
Open

Comments

@tasn
Copy link

tasn commented Apr 18, 2024

Describe the bug
As part of the OpenAPI spec you can define a regex or a range for an integer to show the allowed set of values. This is how it looks like for a specific field (from our docs):
image

The problem is that when it's a list of items, it only shows the properties of the list, and not the specific items, e.g no regex restrictions shown here:
image

Expected behavior
Document both the list and the inner items.

Minimal reproducible OpenAPI snippet(if possible)
Example component:

    "components": {
        "schemas": {
            "EndpointIn": {
                "type": "object",
                "properties": {
                    "uid": {
                        "description": "Optional unique identifier for the endpoint",
                        "type": "string",
                        "maxLength": 256,
                        "minLength": 1,
                        "pattern": "^[a-zA-Z0-9\\-_.]+$",
                        "example": "unique-ep-identifier",
                        "nullable": true
                    },
                    "channels": {
                        "description": "List of message channels this endpoint listens to (omit for all)",
                        "type": "array",
                        "items": {
                            "type": "string",
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9\\-_.]+$",
                            "example": "project_1337"
                        },
                        "maxItems": 10,
                        "minItems": 1,
                        "uniqueItems": true,
                        "nullable": true,
                        "example": [
                            "project_123",
                            "group_2"
                        ]
                    }
                }
            }
        }
    }

Screenshots
See above.

Additional context
None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant