camaraproject / DeviceLocation

Repository to describe, develop, document and test the DeviceLocation API family
Apache License 2.0
21 stars 32 forks source link

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

Closed bigludo7 closed 5 months ago

bigludo7 commented 9 months ago

Problem description Implement use of linting rule set for Device Location API. what we have to do is well documented in Commonalities: https://github.com/camaraproject/Commonalities/pull/110 https://github.com/camaraproject/Commonalities/pull/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 :) :)

jlurien commented 9 months ago

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

rartych commented 9 months ago

@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 commented 9 months ago

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:

jlurien commented 8 months ago

@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