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

Error generating data for a given pattern #141

Closed
odolbeau opened this issue Oct 2, 2024 · 2 comments
Closed

Error generating data for a given pattern #141

odolbeau opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@odolbeau
Copy link

odolbeau commented Oct 2, 2024

Describe the bug

[][] ‼ Something went wrong while running CATS: java.lang.IllegalArgumentException: Could not generate a string for pattern .*(^TVA([1-9][0-9]?|1[0-9]{2})$).* with min -1 and max -1

To Reproduce
cats run with a file containing the extract above.

Expected behaviour
A value which respect the given pattern

Environment:

Key           | Value
------------- | --------------------
OS Name       | Linux
OS Version    | 6.8.0-45-generic
OS Arch       | amd64
Binary Type   | native
Cats Version  | 12.0.0
Cats Build    | 2024-08-28T16:58:54Z
Term Width    | 95
Term Type     | xterm-256color
Shell         | /bin/bash

Extract of the openapi file:

"components": {
    "schemas": {
        "MySchema": {
            "properties": {
                "my_property": {
                    "type": "string",
                    "pattern": ".*(^TVA([1-9][0-9]?|1[0-9]{2})$).*",
                    "nullable": true
                },
            },
            "type": "object"
        },
    },
},  

Additional context

@odolbeau odolbeau added the bug Something isn't working label Oct 2, 2024
@en-milie
Copy link
Contributor

en-milie commented Oct 2, 2024

Thank you for reporting this issue. I'll push a fix for it. It will be available in the next release.

@en-milie
Copy link
Contributor

en-milie commented Oct 9, 2024

@en-milie en-milie closed this as completed Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants