microsoft / microsoft/typespec

[OpenAPI 3] Consider remove the constraint that has no impact to the schema

Open
#6,320 0 comments 0 reactions 0 assignees View on GitHub
emitter:openapi3 feature triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

Although the generated document correct, it can be simpler.
e.g.
```
- type: string
minimum: 1
nullable: true
```
`minimum: 1` only applys to number, it's safe to remove it when the type is not number. Should be low priority.

[Playground](https://typespec.io/playground/?c=c2NhbGFyIFN0ciBleHRlbmRzIHN0cmluZzsNCm1vZGVsIE1vbCB7eDrHF30NCsczTnVtyTNpbnQzMjvJG01vcmXJHE51bcoaSW50MTbMNzE2yh1Ob0XGGcwTUm9vdMpMyyINCkBtaW5WYWx1ZSgxKQ0KdW5pb24gdSB7DQrGNizKLyzlAOEsx38s5QC8LOUA2sQGcmUgLCBudWzEDuUAyiAs5wDuDQp9xGnmAQlUZXN0xF4gIM55ICBhOsZyfMpyfMVyfMdyfMVyfMVyxAZyZSB8xnJ8x3J8x3I7DQp9&e=%40typespec%2Fopenapi3&options=%7B%7D)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.