OpenAPITools / OpenAPITools/openapi-generator
[REQ] I want to know the relationship(AND/OR) between security field in operation object.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I want to get information of security field in operation object.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operation-object
I want to know the relationship(AND/OR) between OrganizationOwner and ProjectOwner.
swagger1.yaml
Following file means OrganizationOwner OR ProjectOwner
post:
security:
- OrganizationOwner: []
- ProjectOwner: []
swagger2.yaml
Following file means OrganizationOwner AND ProjectOwner
post:
security:
- OrganizationOwner: []
ProjectOwner: []
DebugOperations
I saw difference swagger1.yaml and swagger2.yaml with DebugOperations flag. But there is no difference.
"authMethods" : [ {
"name" : "OrganizationOwner ",
"type" : "apiKey",
"hasMore" : true,
"isBasic" : false,
"isOAuth" : false,
"isApiKey" : true,
"vendorExtensions" : { },
"keyParamName" : "Authorization",
"isKeyInQuery" : false,
"isKeyInHeader" : true,
"isKeyInCookie" : false,
"isCode" : false,
"isPassword" : false,
"isApplication" : false,
"isImplicit" : false
}, {
"name" : "ProjectOwner",
"type" : "apiKey",
"hasMore" : false,
"isBasic" : false,
"isOAuth" : false,
"isApiKey" : true,
"vendorExtensions" : { },
"keyParamName" : "Authorization",
"isKeyInQuery" : false,
"isKeyInHeader" : true,
"isKeyInCookie" : false,
"isCode" : false,
"isPassword" : false,
"isApplication" : false,
"isImplicit" : false
} ],
Describe the solution you'd like
I would like to distinguish swagger1.yaml and swagger2.yaml
Environmental
- openapi-generator-cli : 4.0.0-SNAPSHOT
- openapi spec v3.0.0
- generate command
$ docker run --rm -u `id -u`:`id -g` -v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i swagger.yaml \
-g python \
-o /local/out \
-t /local/template \
-Dapis -DapiTests=false -DapiDocs=false -dDebugOperations
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 running the provided openapi-generator-cli command with swagger1.yaml and swagger2.yaml, then compare their DebugOperations output. Trace how the Operation Object security entries are represented and make the generated metadata distinguish the two examples, with the resulting output demonstrating the difference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100