Comments (6)
@madhur2928 thanks for reporting. Certainly the min/max validation is something missing from the current ruleset, however the second use-case should fail. Anyway, I'll look into both of the cases and get back to you soon.
from swagger-brake.
Fixed on master, new version will be released soon.
from swagger-brake.
thanks @galovics for fixing the issue. I took a checkout from master and tried replicating the issue.
Both min/max validation and post object mandatory field validation is working fine now.
But still facing couple of issues.
- min/max validation is working only for GET params but not for POST fields
- regex validation (pattern) is not working for both GET and POST
attached the json files
swagger.zip
from swagger-brake.
@madhur2928 let me take another look then at request body validations. Perhaps I missed it. :)
from swagger-brake.
@madhur2928 in fact request body validation was completely missing, so I'm doing the implementation.
Also, please bear in mind that I intentionally did not implement the regex constraint validation. In my opinion it's way too complicated to implement something like that. The only thing swagger-brake could easily verify if the pattern has changed, but IMHO that's going to result in many false positives. Somehow it should rather detect if the new regex is equal in terms of semantics or an expansion of the original regex. If you have any ideas, feel free to share.
from swagger-brake.
@madhur2928 give it a try from latest master, let's see how it goes.
from swagger-brake.
Related Issues (20)
- Include version number into report and filename HOT 5
- UnsupportedClassVersionError: SwaggerBrakeMain has been compiled by a more recent version HOT 3
- Add support for packaging type .yaml HOT 3
- Exception when comparing swagger files HOT 2
- Recursive schema throws NPE HOT 1
- Support for String minLength/maxLength constraints
- Support for Array minItems/maxItems/uniqueItems constraints
- Required fields in nested definitions are being reported as breaking when they are not HOT 3
- Add support for war files
- Schema class attributeRequiredMap.get(attrToSearchFor); returning null HOT 5
- java.lang.OutOfMemoryError upon first try HOT 16
- Dependency Dashboard
- JDK upgrade
- JUnit 4 migration to JUnit 5
- Upgrade OpenAPI parser
- Switch Docker image build to Google Jib
- Report all changes optionally HOT 1
- Swagger brake cli jar in maven repository HOT 1
- False negatives when removing deprecated properties from models HOT 4
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 swagger-brake.