mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
backport of commit e65d295c88 (#20905)
Co-authored-by: Max Bowsher <maxbowsher@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d59a1ed3c4
commit
6daa1bd468
3
changelog/20881.txt
Normal file
3
changelog/20881.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
sdk/framework: Fix non-deterministic ordering of 'required' fields in OpenAPI spec
|
||||
```
|
||||
@@ -373,6 +373,10 @@ func documentPath(p *Path, specialPaths *logical.Paths, requestResponsePrefix st
|
||||
s.Properties[name] = &p
|
||||
}
|
||||
|
||||
// Make the ordering deterministic, so that the generated OpenAPI spec document, observed over several
|
||||
// versions, doesn't contain spurious non-semantic changes.
|
||||
sort.Strings(s.Required)
|
||||
|
||||
// If examples were given, use the first one as the sample
|
||||
// of this schema.
|
||||
if len(props.Examples) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user