@constantant/openapi-resource-gen@1.12.0
·
3 commits
to master
since this release
🚀 Features
- Upload / download progress (
--reportProgress). New opt-in option (default off).httpClientendpoints that upload a binary ormultipart/*body, or download a blob, now yieldObservable<HttpEvent<T>>—Sent,UploadProgress/DownloadProgress, then theResponse— instead ofObservable<T>.--validateResponsesvalidates only the finalResponseevent.httpResourceendpoints getreportProgress: trueon blob downloads only, because Angular'shttpResource().progress()carries download progress and ignores uploads. JSON bodies, text responses and plain GETs are unchanged. (#72)- Upload progress needs the XHR backend:
provideHttpClient(withXhr()). The defaultfetchbackend can't report upload progress, so you'd only ever seeSentandResponse. Don't usewithXhr()with SSR. - With
--includeMocks, these endpoints getprovideMockHttpEvents(), which needs@constantant/openapi-resource-mocks1.11.0 or newer — older versions don't export it, so regenerated mock files for them would fail to compile. - A working example is the Pets page in
apps/api-explorer: a determinate progress bar with percent and bytes, "Upload failed at N%", and a Cancel button.
- Upload progress needs the XHR backend:
🤖 CI / Packaging
- Releases are now published with npm provenance attestations (this is the first version that has one) through npm trusted publishing (OIDC), so there is no long-lived npm token. The published
package.jsonnow declaresrepository. (#71, #73)
❤️ Thank You
- Konstantin