beckn / protocol-server

protocol-server
5 stars 11 forks source link

Mobility Layer2 config: check out the issues with validation with openAPI version 3.1 #227

Open rajaneeshk90 opened 1 week ago

rajaneeshk90 commented 1 week ago

Ticket Contents

Description

We have a sample layer2 config for the mobility domain. Layer2. This layer2 config uses the opneAPI version 3.1.

Beckn Protocol server uses the "express-openapi-validator" module internally for request validations.

To test out the above layer2 config with Beckn protocol server, Tanya upgraded her local instances of the protocol server to a new version of express-openapi-validator library which supports openAPI 3.1.

This version was used for the validations.

While doing the testing, we faced some issues, as part of this ticket, we need to investigate those issues and find solutions.

Key Points: Protocol server uses node module "express-openapi-validator" for the validations. While developing the l2 config, We used node module "openapi-backend" module for the validations.

There might be some differences between how these libraries do the validations.

Goals

Goals

Expected Outcome

No response

Acceptance Criteria

No response

Implementation Details

NA

Mockups/Wireframes

No response

Product Name

protocol server

Domain

No response

Tech Skills Needed

Express.js, JavaScript, Other

Complexity

High

Category

Research

rajaneeshk90 commented 1 week ago

From what was discussed on the call, we tested the below items:

There could be additional issues that I might have missed. But from my testing I found these things to be working. The mismatch could be due to the different library being used.

Sent a mail to Tanya to get the details of the issues so that the team can dig deeper into it.

rajaneeshk90 commented 4 days ago

Extended the postman collected which is used to test the layer2 configuration on the test server (not the protocol server instance)

This was used while developing the layer2 as the existing protocol server did not have support for openAPI 3.1 at the time.

This could be used for testing when we implement the openAPI 3.1 in protocol serevr.

Took considerable time to add the cases and test.

OAS3.1-validator-Mobility-Test-Server.postman_collection.json

rajaneeshk90 commented 4 days ago

cc @emmayank

rajaneeshk90 commented 3 days ago

All the test cases tested on the l2 config with the test server are listed in this file:

https://docs.google.com/spreadsheets/d/1tEp8TxpSfuOLXimGH3gXIFWIxvffZoWW1fsaoEMuY9E/edit?gid=0#gid=0

rajaneeshk90 commented 3 days ago

cc @faizmagic

rajaneeshk90 commented 22 hours ago

Tanya have not shared the list or the details of the exact issues yet, we investigated the L2 based on the verbal feedback she had given on a call.

rajaneeshk90 commented 11 minutes ago

Had a call with Tanya on 16th of September.

I Demonstrated my postman collection and showed that the contains and allof combination is working for validation.

Unfortunately, we could not continue the call, as she had to drop off. Nevertheless I was able to show that contains and allof combination works fine.

shared with her my postman collection, she can use the postman to try it out offline.

shared with her the ajv version that the openapi-backend library is using.