Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
9
xkonti avatar

Version 23 changelog: ⚠️ Breaking changes:

  • nothingToJson doesn't take the generic TResponse anymore. The type is inferred from the endpoint definition. The endpoint definition doesn't need the requestSchema/requestDesc defined anymore.
  • jsonToJson doesn't take the generic TRequest and TResponse anymore. Types are inferred from the endpoint definition.

Other changes:

  • Added jsonToNothing that accepts an input, but can respond only with an HTTP code.
xkonti avatar

Version 24 changelog

⚠️ Breaking change: jsonToNothing, nothingToJson and jsonToJson don't accept the request/response descriptions. The descriptions are automatically extracted from request/response schemas.

xkonti avatar

Version 25 changelog

The dto in request handlers has been renamed to reqBody.

xkonti avatar

Version 26 changelog

Added config option policyGetter which takes a function that returns the privacy policy. This will automatically create an API endpoint /policy that will return it on demand. The policy getter is a function so that the policy can be imported on-demand.

xkonti avatar

Version 27 changelog

The policyGetter can be an async function now. This supports passing it functions like this:

... , policyGetter: async () => { const { policy } = await import("https://esm.town/v/user/val"); return policy; },
xkonti avatar

Version 29 changelog

If the provided privacy policy ends with </html>, the /privacypolicy endpoint will return it as HTML content instead of plaintext.

xkonti avatar

Version 32 changelog

  • Merged schema builder into the Val
  • Improved TypeScript type definitions
  • Http verbs are now lowercase
xkonti avatar

Version 36 changelog

  • Added a default GET for / path that deisplays URLs of privacy policy and OpenAPI spec
xkonti avatar

Version 67 changelog

  • Improved documentation
Updated: May 29, 2024