Repository navigation
Enforce every grammar key in every consumer - #129
Merged
Merged
Conversation
… validation Validate the raw spec, including the ui block, before any transform. Drop filter, writeFields, long-form role, top-level roles, SAML issuer/audience/trust, 0.3 root input and auth.bindings, string imports in 0.3, options, security redaction, 0.1 OIDC discovery/claim mapping/auto-provision, indexes, store and expand, together with their key-specific checks and IR fields. Add a guard test for schema keys without a consumer.
…the dev server and every generated backend Declared queries resolve bindings and execute in a vendored runtime (Mongo and SQL), handlers receive a single HandlerRequest, and routes calling an operation no handler or repository provides, or paginating a non-list operation, are rejected at parse time.
List routes filter rows by the access rules in memory, in Mongo and in SQL; <collection> by <param> loads the named record; is null over request input holds only for absent keys; the refusal reason applies in every version.
Nested properties, additionalProperties, format, items, defaults, strict scalars, readonly fields and DTO-typed bodies are enforced by the dev server and the generated FastAPI, DRF and raw backends. Each collection gets one <Collection>Fields payload that create and replace extend and update makes partial. Field defaults must conform to their own config and ref fields must name a declared entity. An empty PATCH returns 200.
…nd reject overrides of unexposed operations
Security headers on by default with per-version off switches, CORS and pagination for 0.1, session.ttl as the access-token lifetime, deploy port and mongo.local defaults, api.port as the run default, 0.1 roles and shared validators, mongo beside record datastores rejected, refresh without a MongoDB store rejected, dev API-key lookup on the stored field, and examples that build on every backend.
…through service methods Extending services and repositories merge their ancestors' configuration, minified services share their input and forwarding with every operation, and handlers and repository operations receive the same HandlerRequest in every backend.
…in every backend Identity creates keep a client-chosen role only on authenticated routes, managed roles start at their default, readonly fields are never written, auth.login: false serves no login route, optional raw fields accept null, and raw handlers and DRF views are named per path so routes sharing a collection keep their own access rules.
…urn SQL numbers as floats
…ested CORS headers and reject inconsistent mongo settings Order DRF routes so literal segments precede parameters, keep blank query values for limit validation, report schema errorMessage annotations, and add regression tests for each target.
…elds, validate bodies after access checks and give DTOs a partial update payload SQL datetime columns bind ISO strings; raw payloads use the shared Model helper; raw and DRF responses hide stored credentials.
…p-safe Mongo client, spec-path routing and 200/422 statuses matching the other targets
…ide their method and path
…aring both a handler and an operation
# Conflicts: # src/yaml_api_generator/generators/backend/drf/generator.py # src/yaml_api_generator/generators/backend/drf/templates/views.py.jinja # src/yaml_api_generator/generators/backend/fastapi/generator.py # src/yaml_api_generator/generators/backend/raw/generator.py # src/yaml_api_generator/generators/backend/raw/templates/login_routes.py.jinja # src/yaml_api_generator/generators/backend/raw/templates/routes.py.jinja # src/yaml_api_generator/generators/backend/raw/templates/validation.py.jinja # src/yaml_api_generator/generators/backend/utils.py # src/yaml_api_generator/server/common/pipeline_builder.py # src/yaml_api_generator/server/common/steps/repositories.py # src/yaml_api_generator/server/common/steps/validation.py # src/yaml_api_generator/server/fastapi/factory.py
…ository extends a base
…g a service keep their own access
…ults and refs in every field map of every version
…eSQL and on v0.1 collections, with DTO datetimes
…DRF by path and normalize the handler request Raw and DRF render services and repositories from shared layers, run operations through the service, serve one DRF view per path in route precedence, and hand handlers the last value of repeated query keys, an object body and a principal without credentials.
…ters through every request binding
…ter sensitive rows by owner in the access-control example
… full v0.2 grammar in the v0.2 docs
…ages in the v0.3 docs
…route record bindings over HTTP on every backend Document explicit-controller access defaults, operations overrides and their precedence, and record bindings on custom routes.
…ation routes, make declared soft-delete fields readonly, reject presence keys on array items and check service input refs
…and pagination envelopes across every backend Abstract repositories accept crud, lifecycle and parameterised operations; queries naming a collection run on its datastore; raw ASGI answers 405 with Allow; integer numbers stay integers in FastAPI and SQL; service switches must name a provided operation.
…rver and backend, and name the top-level roles fixture after its case
…server and FastAPI target, offered by the UI and rejected by raw and DRF
… controller declares a login route
…n rejects a credential provider without an identifier
…r and every generated backend
…k operations, unique indexes and stored files includeDeleted widens reads only; declared SQL deletes stamp removal; expired rows are purged with their files.
…he page The crud view builds a Delete page from its delete slot; detail pages delete through it. Pack props declare item types and defaults, and the guard test checks each component's props are read by its template.
…fuse a removal timestamp on create
…he deciding rule does not read the record
…kend enforces policies
…xample and fixture specs
…an unevaluated key of its parent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every grammar key is either enforced in every consumer (dev server, generated FastAPI, DRF and raw ASGI backends, UI generator) or rejected by schema validation.
All versions
filterandwriteFieldsno longer exist;role:inside a long-formgiven:rule is rejected. Per-role writable fields are expressed as separate operations with their own serviceinput:.properties/additionalPropertiesare validated as nested models with extra keys forbidden.whenover a document acts as a row filter on list routes.<collection> by <param>binds the record the route addresses.0.1
options.strict,indexes,security.redaction,refstore: embed/expandand OIDCdiscovery_url/claim_mapping/auto_provisionare removed.mongoblock is the default datastore; the dev server runs 0.1 specs.security.headers.enableStandardsends the standard security headers in every backend.0.2
roles:is removed; role hierarchies live inentities.<e>.roles.hierarchy.softDelete: <timestampField>and per-operationincludeDeleted: trueon custom repository operations.ttl: { field, seconds }expires rows on every datastore (MongoDB TTL index; SQL row filter and purge).api.operations.defaultsaccepts only CRUD switches andapi.operations.authonlyregister/login;auth.login: falsegenerates no login route.api.securityHeaders: falseturns them off.api.portis honoured bystackform run, deploy, DRF and the UI.deploy.mongo.localis honoured and defaults fromdatastores.abstract/extendsgenerate abstract service base classes; custom operations run through service methods.type: samlare rejected,relationsare applied in the callback, SAML login works in the dev server, and replayed or malformed responses are rejected.0.3
input:andentities.*.auth.bindingsare removed (via:replaces bindings);importsaccepts only the object form.UI
uiblock is validated against the pack manifest.Docs and examples