-
Notifications
You must be signed in to change notification settings - Fork 31
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
OpenAPI #50
Comments
In my project I'm using OpenAPITools/openapi-generator, which is a Java project, its cli requires Java to be present/you can use the docker image they provide. It would be nice to have, but I don't know how to feel abut the Java dependency. Maybe as a separate cli package it could work? Generating telefunctions would be very simple that way. This project could be useful too, it's written in typescript. |
@nitedani Neat 👍. It'll most likely be a separate package but, yea, a TS dependency would be better. |
Example OpenAPI with Swagger UI: https://editor.swagger.io/ The way I imagine OpenAPI intergration is not to generate telefunctions, but to generate an OpenAPI spec from Brain dump:
|
Sounds good 👍.
Spontaneously/naively I'd lean towards convention over configuration here and enforce
I was thinking of having a new // api/pet.telefunc.ts
import { cache } from 'telefunc'
cache(findOne)
export async function findOne(id: number) {
/* ... */
}
I wonder what the drawbacks would be to not respect REST principles. For example:
If we deviate from REST we can make things simpler, but maybe that'd be inconvenient for OpenAPI clients. |
I think we can first not care about REST principles (e.g. |
Both ways are interesting:
@nitedani Curious: could Telefunc automatically generate your setup?
CC @louwers.
The text was updated successfully, but these errors were encountered: