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

Auto Generate Client Code #112

Open
SellersEvan opened this issue May 6, 2024 · 0 comments
Open

Auto Generate Client Code #112

SellersEvan opened this issue May 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SellersEvan
Copy link
Member

SellersEvan commented May 6, 2024

Is your feature request related to a problem? Please describe.
Auto-generate client code and OpenAPI documents from your APIs.

Describe the solution you'd like
Add JS doc comments above your endpoints to generate client functions in different languages.

import foo from "..."

/** Title
 * Description
 * @method getPost
 * @paramater param1 {int} - description
 * @paramater param2 {?foo} - description
* The above helps build the function ... other OpenAPI props here optional
*/
export function POST<requestSchema, responseSchema>() {
    return Response.JSON({
        "string": "food",
        "number": 3,
        "boolean": true,
        "object": {
            "numbers": [3, -4]
        }
    });
}

Describe alternatives you've considered
N/A

Additional context

@SellersEvan SellersEvan added the enhancement New feature or request label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant