stoplightio / spectral

A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v3.1, v3.0, and v2.0 as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.35k stars 226 forks source link

Schema of type string must specify maxLength, enum, or const #2634

Open mcrobbj opened 1 month ago

mcrobbj commented 1 month ago

For support questions, please use the Stoplight Discord Community. This repository's issues are reserved for feature requests and bug reports. If you are unsure if you are experiencing a bug, our Discord is a great place to start.

Please delete this section, any any sections below that you don't use, before creating the issue.

Describe the bug Should pattern not be added to this, as the regex will state what the maxLength can be?

To Reproduce

  1. Given this OpenAPI/AsyncAPI document '...'
  2. Run this CLI command '....'
  3. See error

Expected behavior No error if a pattern is available.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (remove any that are not applicable):

Additional context Add any other context about the problem here.

daniel-white commented 3 weeks ago

hi - we're not sure what you are asking. can you please provide answers to the prompts above so that we can better help you? thanks!