Limitations
Verified limits of the current tool, so you don't discover them in production.
Runtime
- Rivet does not perform JSON Schema validation at runtime. Constraint attributes (
[Range], ...) are enforced by the host framework, not Rivet (recipes;[RivetConstraints]is aValidationAttributeand participates). - Contract-owned
Success,Error, andFileterminals validate declared statuses, body presence, payload CLR types, derived-instance extra-field leakage, and declared content types before first-party MVC or Minimal API adaptation. They do not inspect serialized JSON against its schema. Full statement: Runtime Validation. - Host effects such as authentication challenges, sign-out cookies, and dynamic response headers happen through ordinary ASP.NET APIs before returning a matching bodyless terminal. Rivet preserves an already-started matching response and rejects status conflicts; native framework results never pass through the contract.
Generation
- Input must compile: generation aborts on compilation errors, and on type-name collisions between namespaces (component names are global).
- Enum values are emitted camelCased — the spec matches a camelCase
JsonStringEnumConverter; if your API serializes enums differently (e.g. as integers), the spec will not match the wire. TimeSpanandBigIntegerhave no schema mapping — they emit an untyped (empty) schema with a diagnostic (RIV1009/RIV1010). Escape hatch: expose the value as astringproperty (ISO 8601 forTimeSpan, digits forBigInteger) or as a number when the range allows.- Security scheme definitions come from the
--securityflag;.Secure("name")with no matching definition fails generation (RIV2002). - The spec reflects declared C# types and the default System.Text.Json conventions.
[JsonPolymorphic]/[JsonDerivedType]hierarchies emit asoneOf+discriminator; runtime polymorphism without those registrations, custom serializer settings, and validation living outside attributes (e.g. FluentValidation) are invisible to the spec. info.title,info.version, andserverscome from the--title,--version, and--serverflags (defaults:"API"/"1.0.0"/ noserversblock); there is no flag forinfo.contact,info.description, orinfo.license.
Importer (--from-openapi)
A one-shot onboarding scaffold, not a sync tool. Callbacks, webhooks, links, parameter serialization styles, multi-scheme security, and security scheme types are out of scope (discriminator dispatch imports as a [JsonPolymorphic] hierarchy when the oneOf mapping is usable, and falls back loudly otherwise) — the full honest list, including every diagnostic marker and warning category, is in the Import Profile.
Formats
- OpenAPI 3.1 is the only public output. The contract JSON consumed by
--fromis an internal IR shared with the sibling runtimes. - The v1 TypeScript/Zod generators (
--compile,--jsonschema) were removed in v2; those flags exit with an error pointing at the OpenAPI ecosystem replacements.
