openapi-typescript-codegen
Fable: F# |> BABEL
openapi-typescript-codegen | Fable: F# |> BABEL | |
---|---|---|
9 | 60 | |
2,673 | 2,816 | |
- | 0.4% | |
9.6 | 9.7 | |
1 day ago | 9 days ago | |
TypeScript | F# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
openapi-typescript-codegen
-
Django 5.0 Is Released
I’d also add that if you use Typescript with an OpenAPI client generator (https://github.com/ferdikoomen/openapi-typescript-codegen) it can immensely alleviate some of the biggest pain points of seperate backend and front-end. It always used to be a major pain in the ass with the amount of overhead an API change would incur - updating documentation, postman, constant communication between backend and front-end devs, etc. Now I just npm run generate, I see new API changes in my Git client and Typescript errors for code that needs updating.
Also, using a library like Tanstack Query or Rdtk Query can almost completely eliminate manual state management, and kinda makes the whole development experience feel almost like SSR.
-
Ask HN: What would you use to build a mostly CRUD back end today?
I have been in love with Loopback.io since v2 even though it was a bit of a rollercoaster.. Loopback v4 is a beautiful library. Its been around longer than nestjs but that's the easiest thing to compare it too. I recently have been creating lb4 servers that interface nextjs and react native clients. Initially, I identify my entities and use cases that I want to build. I then use the lb4 cli to auto generate models, relations, controllers, datasources, interceptors (add logic on methods/classes). I can start testing them with the OpenAPI explorer. With the openapi-typescript-codegen library I can generate services from my lb4 OpenAPI spec that I can use on the client side. From there, you can really query data easily with the loopback filter (which can be used on the client too). I initially started doing this with angular1/2+ but its been pleasant using many clients. Even though I have been leveraging it for years in production, I am still learning and exploring. There are many other awesome things I can expand on or explain if you are interested!
https://loopback.io/doc/en/lb4/
https://github.com/ferdikoomen/openapi-typescript-codegen/tr...
-
tRPC – Move Fast and Break Nothing. End-to-end typesafe APIs made easy
In our current project with a TS frontend and Python backend, we use an OpenAPI schema as the source of truth and openapi-typescript-codegen [0] to interface with it on the client side. While not perfect, it provides a very nice interface to our API with request/response typings.
I also wrote a 10-line mock API wrapper that you can call as mockApi((request) => response), and it will type-check that your mock function implements the API correctly.
[0]: https://github.com/ferdikoomen/openapi-typescript-codegen
-
Is it possible to create a dynamic type/interface from API response
Second step is to generate typescript types from the backend's spec. You can use a library like this.
- Voi va generați modele automat pe FE?
-
A minimalist backend REST API in NodeJS
openapi-typescript-codegen Generates a Typescript client with interfaces from an OpenAPI spec.
-
Merging duplicate interfaces
I'm not familiar with all the options openapi-generator has. I tried it awhile ago and found it quite buggy, and more of a pain to run, especially if you're not already doing Java development. I ended up preferring OpenAPI Typescript Codegen, which is written in Typescript. One option it has which would solve the problem you're running into here, is that you can tell it to use union types instead of enums. So your interfaces would be generated as
-
Don't make me think, or why I switched to Rails from JavaScript SPAs
I'm currently working on two separate projects, the first is a Django project with DRF and I codegen with drf-spectacular [1] and openapi-typescript-codegen [2]. The other project also uses Django, with the API through Hasura and codegen with graphql-codegen [3]. In both of these cases I've been able to largely avoid duplicating my models clientside, or at least it isn't manual.
1: https://github.com/ferdikoomen/openapi-typescript-codegen
2: https://drf-spectacular.readthedocs.io/en/latest/
3: https://github.com/dotansimha/graphql-code-generator
-
Need some advice on how do do my webapp (front + backend)
For typescript client code generation, I typically use something like openapi-typescript-codegen, but there are a lot more generators (like the openapi-generator project) that are imperfect in their own ways, I'm sure you can find one that works for you.
Fable: F# |> BABEL
-
Dada, an Experiement by the Creators of Rust
This conversation could be referring to https://fable.io/
Other than that, the question is indeed strange and I agree with your statements.
-
Exploring a foreign F# codebase
NOTE: For larger codebases with more history it is likely that the Program.fs file will have a lot of orchestration and logic as well. given that it is often where everything clashes and starts, for example the Fable Entrypoint is in Entry.fs and it contains a lot of code. The best you can do always is to start at the bottom of the file and work your way up. Remember: Everything at the bottom uses what has already been defined at the top so there are no circular dependencies or random functions/types at the bottom that can trip you off, everything comes from the top!
-
Revisiting WASM for F#
I am a big fan of going with web components + plain (build-less) javascript whenever possible, so it is not surprising that I often favor things like the Fable Compiler, where I can target my F# code directly to javascript and be as close to the native JS experience as possible, both for interop concerns and for ecosystem integration.
-
A new F# compiler feature: graph-based type-checking
Fable compiler - https://fable.io/
The F# community is very friendly (these sub-communities as well), and they have plenty of good issues/opportunities to contribute OSS work to across any skill level.
Phosphor isn't hiring right now, but we expect to begin a search for FE/interface engineers over the next few month. Email [email protected] for anyone interested.
-
Building React Components Using Unions in TypeScript
Naturally I’d recommend using a better language such as ReScript or Elm or PureScript or F#‘s Fable + Elmish, but “React” is the king right now and people perceive TypeScript as “less risky” for jobs/hiring, so here we are.
- Fable: an F# to Dart compiler
-
Dart 3.1 and a retrospective on functional style programming in Dart
Stuff like this: https://github.com/fable-compiler/Fable/issues/1822
It just seems like an incredibly ambitious project that appears to have very little equal but is mainly worked on by a handful of people but no corporate backing. I get the feeling that if you want to use it, you'll either be the only one doing what you're doing or among just a few people. I already use F# and feel this way about the core language itself.
-
Elixir – Why the dot (when calling anonymous functions)?
F# is also part of the OCaml family, has a great to-JS transpiler (https://fable.io/) and F# code can also be used in .NET projects.
- Is it possible to write games like Pac-Man in a functional language?
-
URGENT HELP NEEDED! Should I learn C#, ASP.NET and the new MAUI framework?
I have heard many good things about https://fable.io/ Fable converts F# code to JavaScript. There are currently 407 packages available for interacting with existing JavaScript packages and frameworks.
What are some alternatives?
openapi-client-axios - JavaScript client library for consuming OpenAPI-enabled APIs with axios
rescript-compiler - The compiler for ReScript.
orval - orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
Sutil - Lightweight front-end framework for F# / Fable. No dependencies.
SvelteKit - web development, streamlined
ClojureCLR - A port of Clojure to the CLR, part of the Clojure project
Devise Token Auth - Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
Roslyn - The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
graphql-code-generator - A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
Feliz - A fresh retake of the React API in Fable and a collection of high-quality components to build React applications in F#, optimized for happiness
openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
haxe - Haxe - The Cross-Platform Toolkit