Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement use of linting rule set for Device Location API #125

Closed
bigludo7 opened this issue Dec 12, 2023 · 4 comments · Fixed by #167 or #185
Closed

Implement use of linting rule set for Device Location API #125

bigludo7 opened this issue Dec 12, 2023 · 4 comments · Fixed by #167 or #185
Assignees
Labels
subproject management Indicating issues with subproject repository or release management process

Comments

@bigludo7
Copy link
Collaborator

Problem description
Implement use of linting rule set for Device Location API.
what we have to do is well documented in Commonalities:
camaraproject/Commonalities#110
camaraproject/Commonalities#74

Expected action
Check our APIs with linting rule set
provide feedback to commonalities team

Additional context
cc: @rartych who asked project volunteer to perform this action.
... Rafal also said that @jlurien is volunteer to run this :) :)

@bigludo7 bigludo7 added the subproject management Indicating issues with subproject repository or release management process label Dec 12, 2023
@jlurien
Copy link
Collaborator

jlurien commented Dec 12, 2023

I can help with this. Not sure if we have the admin rights to make the adjustments in the CI

@rartych
Copy link
Collaborator

rartych commented Dec 12, 2023

@jlurien in the initial phase it is proposed to test the ruleset on private fork of the repository or with local installation of Spectral on PC - detailed instructions are in Commonalities PR#110 or here: https://github.com/ravindrapalaskar17/Commonalities/blob/API-linting-Implementation-Guideline/documentation/API-linting-Implementation-Guideline.md

@jlurien
Copy link
Collaborator

jlurien commented Dec 18, 2023

Tested in local:

Linting /camaraproject/DeviceLocation/code/API_definitions/location-verification.yaml

/camaraproject/DeviceLocation/code/API_definitions/location-verification.yaml
 160:13  warning  oas3-operation-security-defined  "location-verification:verify" must be listed among scopes.                                                                                            paths./verify.post.security[0].openId[0]
 163:12  warning  camara-parameters-descriptions   Parameter description is missing or empty: "openId.description" property must be truthy                                                                components.securitySchemes.openId
 167:10  warning  camara-parameters-descriptions   Parameter description is missing or empty: "Area.description" property must be truthy                                                                  components.schemas.Area
 167:10  warning  camara-parameters-descriptions   Parameter description is missing or empty: "Area" property must be truthy                                                                              components.schemas.Area
 178:12  warning  oas3-unused-component            Potentially unused component has been detected.                                                                                                        components.schemas.Circle
 228:27  warning  camara-parameters-descriptions   Parameter description is missing or empty: "VerifyLocationRequest.description" property must be truthy                                                 components.schemas.VerifyLocationRequest
 241:28  warning  camara-parameters-descriptions   Parameter description is missing or empty: "VerifyLocationResponse.description" property must be truthy                                                components.schemas.VerifyLocationResponse
 288:20  warning  camara-discriminator-use         Ensure that API definition YAML files with oneOf or anyOf sections include a discriminator object for serialization, deserialization, and validation.  components.schemas.DeviceIpv4Addr
 359:15  warning  camara-parameters-descriptions   Parameter description is missing or empty: "ErrorInfo.description" property must be truthy                                                             components.schemas.ErrorInfo

✖ 9 problems (0 errors, 9 warnings, 0 infos, 0 hints

Only warnings:

  • warning oas3-operation-security-defined "location-verification:verify" must be listed among scopes. -> scopes are not listed in openIdConnect secuirtySchemes, not sure if ruleset can be modified.
  • Potentially unused component has been detected. -> This is related to polymorphism. It is OK in the spec.
  • Parameter description is missing or empty -> Mainly from low level some schemas without description. Descriptions are usually at a higher level.

@jlurien jlurien closed this as completed Dec 18, 2023
@jlurien jlurien reopened this Dec 18, 2023
@jlurien
Copy link
Collaborator

jlurien commented Jan 25, 2024

@MarkusKuemmerle @rartych We have already tested the linting here and next step would be to adjust the Github actions to add it as part of the CI process in this project. as QoD has. I think that @bigludo7 and me as code owners, we don't have the admin rights to do it. How can we proceed with this? or are there other plans to manage this for all the subprojects at same time? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subproject management Indicating issues with subproject repository or release management process
Projects
None yet
3 participants