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

Finalized the OpenAPI Client Validator Spec #5162

Closed
1 of 2 tasks
lnash94 opened this issue Mar 10, 2022 · 2 comments
Closed
1 of 2 tasks

Finalized the OpenAPI Client Validator Spec #5162

lnash94 opened this issue Mar 10, 2022 · 2 comments

Comments

@lnash94
Copy link
Member

lnash94 commented Mar 10, 2022

Description:
This issue is created to track the subtask of openAPI client generator implementation.

Describe your task(s)

  • Identify the feasibility of the implementation
  • Identify the initial scenarios need to validate

Related Issues (optional):
Core issue: #5388

Suggested Labels (optional):

Suggested Assignees (optional):

@lnash94
Copy link
Member Author

lnash94 commented Apr 7, 2022

Please find attached [2] for the initial proposal and some blockers we met during the effort of identifying the validation scenarios.

We have some limitations in resolving [client endpoint path](https://docs.google.com/document/d/19u5uzbcA1TCFLmEWG6m9yB11EkRGsIwUcjUAS_5DEo4/edit#heading=h.jsp3ot6p0seq), Since there is no type concept for URLs, we need to check the value itself against a URL template to uniquely identify resources and thereby validate requests and responses.

However, when validating the request and response all we need to do is get the type of the associate variable/argument and make sure its type is in line with the schema type in the OAS.

We envision the ballerina client as below way to validate.

type Person record {
   int age;
   string name;
};
public function main() returns error? {
   http:Client c = check new ("http://localhost:9090");
  
   int id;
    // 01. With string template
   json response = check c->post(string `/user/${id}`,
   {
       age: 18,
       name: "Harry"
   });
   // 02 With string value
   json response = check c2->post(“/user/1”,
   {
       age: 18,
       name: "Harry"
   });
}

Therefore we need to finalize our approach before starting our implementation

@lnash94 lnash94 transferred this issue from ballerina-platform/openapi-tools Nov 1, 2023
@lnash94 lnash94 moved this to Todo in OpenAPI Tool Roadmap Dec 4, 2023
@lnash94
Copy link
Member Author

lnash94 commented Nov 27, 2024

Close this issue we have no major requirements for this.

@lnash94 lnash94 closed this as completed Nov 27, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in OpenAPI Tool Roadmap Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant