{"repo":"ElMassimo/types_from_serializers","free":true,"listed":false,"github":"https://github.com/ElMassimo/types_from_serializers","clone":"git clone https://github.com/ElMassimo/types_from_serializers.git","description":"✅ Generate TypeScript interfaces from your JSON serializers","language":"Ruby","stars":155,"topics":["codegen","ruby","typescript","activemodelserializers","oj","serializers"],"license":"MIT","category":"dev-tools","readme_excerpt":"Types From Serializers [oj]: https://github.com/ohler55/oj [oj serializers]: https://github.com/ElMassimo/oj serializers [ams]: https://github.com/rails-api/active model serializers [Rails]: https://github.com/rails/rails [Issues]: https://github.com/ElMassimo/types from serializers/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc [Discussions]: https://github.com/ElMassimo/types from serializers/discussions [TypeScript]: https://www.typescriptlang.org/ [Vite Ruby]: https://github.com/ElMassimo/vite ruby [vite-plugin-full-reload]: https://github.com/ElMassimo/vite-plugin-full-reload [base serializers]: https://github.com/ElMassimo/types from serializers#base serializers [config]: https://github.com/ElMassimo/types from serializers#configuration-%EF%B8%8F Automatically generate TypeScript interfaces from your [JSON serializers][oj serializers]. Currently, this library targets [ oj serializers ][oj serializers] and ActiveRecord in [Rails] applications . Demo 🎬 For a schema such as this one: DB Schema and a serializer like the following: it would generate a TypeScript interface like: Note This is the default configuration, but you have [full control][config] over generation. Why? 🤔 It's easy for the backend and the frontend to become out of sync. Traditionally, preventing bugs requires writing extensive integration tests. [TypeScript] is a great tool to catch this kind of bugs and mistakes, as it can detect incorrect usages and missing fields, but writing types manually is cu","default_branch":null,"files":null,"tree":[],"storefront":"/r/ElMassimo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ElMassimo/types_from_serializers/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}