swagger-api / swagger-api/swagger-codegen
[JAX-RS] Missing import for http PATCH
Open
Nobody has claimed this yet.
Enhancement: General
help wanted
Server: Java
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Generated code does not contain import for patch requests. import io.swagger.jaxrs.PATCH; is missing
spec file
"patch": {
"tags": [
"box"
],
"summary": "Patches a box Meta data",
"description": "",
"operationId": "updateBox",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "boxId",
"description": "Id of the box to be edited",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "box",
"description": "JSON Patch format of the attributes to be edited in a box",
"required": true,
"schema": {
"type":"array",
"items":{
"$ref": "#/definitions/PatchDocument"
}
}
}
],
"responses": {
"200": {
"description": "Box was edited and the a box object returned with the new information ",
"schema": {
"$ref": "#/definitions/Box"
}
},
"400": {
"description": "Bad Request"
},
"422": {
"description": "Unprocessable entry"
}
}
}
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
Start by reproducing generation with the supplied Swagger spec and inspect the JAX-RS generated output for the PATCH operation. Trace the generator template or entry point responsible for HTTP-method imports and verify that the output includes import io.swagger.jaxrs.PATCH; for patch requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100