API

Dev tools

api framework

SHOW HN2023

102points
78comments
#636of 3,109 in 2023
Top 21%of 2023 by points

How HN took it

MixedNo clear lean

4 positive, 7 neutral or asking, 1 mixed, 7 critical, out of 19 comments about the project. Thread score -0.08.

Idea: 2 for, 6 againstDocs: 1 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Clean, efficient validation approach

    From 1 comment
    • Neat. I like the fresh take on validation. It’s not necessarily unique, but it may be cleaner / more efficient than previous attempts. The mixing of backend processing and the…
      mlmilleratmit on HN
  • Good use of OpenAPI generation

    From 1 comment

Objections

  • Calling it type-safe is misleading; it is runtime validation, not type safety

    From 3 comments
    • Type Safety != Runtime Type Validation. Something being Type Safe means that I, the programmer, am Safe from making type mistakes while developing and maintaining the software.…
      stagas on HN
    • It's not pedantry, you're using the term wrong. I understand why it can be confusing if you are just using JavaScript and you haven't had the experience of type-safe codebases.…
      stagas on HN
    • For this software to be appealing it would need to really be type-safe, meaning you'd need to use TypeScript. Type-safe means I can change an interface in project B and project A…
      stagas on HN
  • TypeScript would be a better approach

    From 3 comments
    • We tried for years to do things like this, and in the end an approach using typescript is way, way better than anything else I've seen attempted. In my latest project[1], we set…
      tsergiu on HN
    • Nice, this should help all zero businesses building APIs in JS /s Start using TS.
      flashback2199 on HN
    • I can definitely comprehend it. What I can't comprehend is wanting types and building a custom special snowflake library instead of using the right tool "I needed a screwdriver,…
      flashback2199 on HN
  • Documentation error in the README longitude range

    From 1 comment
    • I spotted a bug in the README's first example: ``` @param {number {-90,90}} coords.lng Longitude ``` The range for longitude is incorrect, and only covers half the globe. How and…
      mkl on HN

Requests

  • Add TypeScript support

    From 2 comments
    • That’s good feedback! We can probably do both; if you think it’s cool would you be interested in contributing to TypeScript support to circle the square?
      keithwhor on HN
    • Our approach doesn’t preclude TypeScript! In fact I think it would integrate well with it. If you’re interested in a TS approach could you email me at keith@instant.dev ?
      keithwhor on HN
  • Content negotiation and header-based routing

    From 2 comments
    • Neat! Does this framework have any tools for content negotiation? I get that you could do this in the handlers themselves, but in my experience different representations are…
      mstade on HN
    • Here's a simple use case: human friendly and machine friendly representations at the same path. For example, let's say I have an api at `/weather` which when requested with the…
      mstade on HN

Questions

  • How and when are types checked, only at runtime?

    From 1 comment
    • I spotted a bug in the README's first example: ``` @param {number {-90,90}} coords.lng Longitude ``` The range for longitude is incorrect, and only covers half the globe. How and…
      mkl on HN
  • Performance and scalability in production?

    From 1 comment
    • Neat. I like the fresh take on validation. It’s not necessarily unique, but it may be cleaner / more efficient than previous attempts. The mixing of backend processing and the…
      mlmilleratmit on HN

Alternatives named

  • Zod

    From 1 comment
    • Zod[1] is probably the closest 1: https://www.npmjs.com/package/zod 1: https://github.com/colinhacks/zod
      Loeffelmann on HN
  • FastAPI

    From 1 comment
    • Both the name and intent seem highly inspired from FastAPI!
      whinvik on HN
  • TypeScript

    From 1 comment
    • We tried for years to do things like this, and in the end an approach using typescript is way, way better than anything else I've seen attempted. In my latest project[1], we set…
      tsergiu on HN
  • Swagger/OpenAPI tooling

    From 1 comment
    • > But OpenAPI is the “gold standard” machine readable API specification format I remember when that would have been WSDL, with something like SoapUI - where you'd feed in the…
      KronisLV on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/38021461)