Comments (5)
I will investigate, thanks for finding this.
from libopenapi.
Found a possible cause on https://github.com/pb33f/libopenapi/blob/main/what-changed/model/example.go#L73.
The Tag
of the Value
is not taken in to account. !!timestamp
vs !!str
.
I will create a PR.
from libopenapi.
This is not fixed with my fix in #62.
The test case didn't include a map as a value:
value:
map:
date: 2022-12-29`
The changes := CompareExamples(&lDoc, &rDoc)
returns nil
. In places where it is used, there is no nil check: https://github.com/pb33f/libopenapi/blob/main/what-changed/model/media_type.go#L26
It is assigned by CheckMapForChangesWithComp
on https://github.com/pb33f/libopenapi/blob/main/what-changed/model/comparison_functions.go#L253.
So there are a few places where it can break and this might not only be related to examples.
from libopenapi.
I will check for other instances of this issue.
from libopenapi.
This is an isolated incident; after reviewing the other models, examples are the only place where this type of comparison is performed. The glitch was a nil
reference being added to the resulting map, as you detected, the code now performs a check before adding the results, and examples that use complex shapes are now hashed for comparison. The fix is in #65
from libopenapi.
Related Issues (20)
- Missing Line and Column Information in model.ChangeContext for Enum Changes. HOT 2
- Response Headers aren't easily validated HOT 1
- Bundling local files causes root file references to be inlined.
- Escape in $ref HOT 2
- schema build fails when file references contain references to other files HOT 2
- $ref not correctly resolved [regression] HOT 2
- Make the timeout in `FindNodesWithoutDeserializing` configurable HOT 1
- How to read stand alone OpanAPI compatible models from a separate file? HOT 6
- False positive circular ref on large JSON payloads HOT 5
- Validation of simple parameters HOT 2
- panic in index/resolver HOT 2
- How to create bodySchema & other params HOT 3
- Rolodex.Resolve() doesn't override the description from #ref definition HOT 6
- example for documentation doesn't work? HOT 4
- Render() function panics due to ignored error HOT 1
- nullable: true for response validation HOT 1
- ref in schema cant parse HOT 3
- Support `$dynamicAnchor` and `$dynamicRef` HOT 2
- Validation and Bundling problems HOT 9
- Remote reference cannot be resolved HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libopenapi.