swagger-api / swagger-api/swagger-parser
need to write a java code for validating a json response against a OpenApi json schema
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
need to write a java code for validating a json response against a OpenApi json schema.
For example the petstore has a get api definition as shown below
"/pet/findByStatus": {
"get": {
The schema for the above get response is defined like this
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Pet"
}
}
I have a sample pet.json response with me which i want to validate against the given petstore.json OpenApi specification
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue mentions a petstore.json OpenAPI specification and a sample pet.json response, but no repository file, test, or entry point. Start by determining whether swagger-parser already exposes schema-validation support, then define an example using the /pet/findByStatus response schema. Done should include a documented Java validation path or a clearly scoped implementation request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100