- changed status to open
[v2.0] swagger-request-validator v2
This ticket tracks the progress of the v2 major release of the swagger-request-validator.
The primary change will be support of OpenAPI v3 specs, but there may be other API changes etc. made in this version.
Comments (15)
-
reporter -
reporter My likely plan of attack will be:
- General refactoring and cleanup of existing codebase
- Add test coverage powered by v3 specs
- 'fill the gaps' where the v3 spec has enhanced what the v2 spec already supported (e.g. discriminator mappings etc)
- Identify 'critical' new functionality to add validation for
- Release 2.0
- Add validation for 'non-critical' pieces as part of regular development/maintenance
Release candidates will be available to get feedback/comments. The first one will be released once the 2.0 branch is reasonably stable. In the meantime you are welcome to build a -SNAPSHOT version from the branch to test against - comments and bug reports welcomed.
-
reporter - changed title to [v2.0] swagger-request-validator v2
-
Is it already possible to give an estimate of when you expect the 2.0 release to be available?
-
reporter Not yet unfortunately. I should have a better idea of remaining effort by the end of this week.
-
Progress update?
-
reporter swagger-request-validator:2.0.0-rc1
is now in Maven Central.RC1 includes basic support for Open API v3, with almost the same feature coverage as the 1.x branch. The major exception to this is form-data validation (coming in the next release candidate).
Major changes:
- Basic OpenAPI v3 support
- Parameter validators have been removed - all schema validation is now performed by the jsonschema validator
- As a result, validation message keys have changed (but are now more consistent)
- API operation resolution updated to support the new
servers
concept in the OAI3 spec
Coming soon:
- Renaming the core validator to remove 'swagger' and replace with 'openapi' naming (will leave the existing validator in place but mark it as deprecated)
- Adding form-data validation
- Adding more message context information
-
Will this fix be in v2? Add the following constructor to the open source project: https://bitbucket.org/atlassian/swagger-request-validator/src/267f1c2342a93a5bc236a74094bb4d73404a29b3/swagger-request-validator-pact/?at=master
public ValidatedPactProviderRule(final String swaggerJsonUrl, final String basePathOverride, final String providerId, final Object target, String host, int port) { this.delegate = new PactProviderRule(providerId, host, port, target); this.providerId = providerId; this.target = target;
this.validator = SwaggerRequestResponseValidator .createFor(swaggerJsonUrl) .withLevelResolver(PactLevelResolverFactory.create()) .withBasePathOverride(basePathOverride) .build(); }
-
Hi, I'm trying to use 2.0-rc1 to validate endpoints against oapi 3.0 schema and get issue with all POST requests: [ERROR] No request body is expected for POST on path '{MY_PATH}. at com.atlassian.oai.validator.restassured.SwaggerValidationFilter.filter(SwaggerValidationFilter.java:61) at io.restassured.filter.Filter$filter.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at io.restassured.filter.Filter$filter.call(Unknown Source) at io.restassured.internal.filter.FilterContextImpl.next(FilterContextImpl.groovy:72) at com.nbcuni.oa.test.core.api.utils.CustomRequestLoggerFilter.filter(CustomRequestLoggerFilter.java:42) at io.restassured.filter.Filter$filter.call(Unknown Source) ....
Request body description is different between oapi 3.0 and swagger 2.0 and that might be a reason. I can provide the full log/schema if needed.
-
Will v2 support validation for both the old Swagger 2 and the new OpenAPI 3? Or will v2 only support OpenAPI 3 and breaking backwards compatibility?
-
reporter Full backwards compat. It would be great if you get a chance to try out the 2.0-rc1 build and let me know any problems you find (feel free to raise issues tagged with
[v2.0]
) -
reporter @seamcat it would be great if you could raise an issue for the problem you're encountering and include an example schema / test that can reproduce it - thanks!
-
reporter 2.0.0-rc2 build has been released.
Major changes:
- Support for discriminator mapping
- Support the
nullable
schema keyword - Bug fixes applied from the 1.4.6 release
-
reporter Update: 2.0.0-rc3 has been released.
This will be the final RC before the 2.0.0 final, pending some final testing.
-
reporter - changed status to resolved
Released version 2.0.0
- Log in to comment