AxiomCore
Acore Language

Variants and filtering

Produce bounded endpoint and model surfaces from one service contract source.

Variants select names during contract materialization. The default base schema includes a default variant that includes *.

variants = Mapping {
  ["mobile"] = VariantConfig {
    include = Listing { "public_*" "profile" }
    exclude = Listing { "admin_*" }
    includeModels = Listing { "User" "Profile" }
    cache = CachePolicy { strategy = "network_first" ttlSeconds = 60 }
  }

  ["operations"] = VariantConfig {
    include = Listing { "admin_*" "internal_metrics" }
    cache = CachePolicy { strategy = "network_only" ttlSeconds = 0 }
  }
}

Build one selected variant:

axiom build axiom.acore --variant mobile

include/exclude apply to endpoint names; includeModels/excludeModels apply to model names. Exclusion narrows an included surface. A variant can also override cache policy.

Variants reduce what is emitted to a consumer; they are not authorization. Protect the backend independently and use signed audience/security declarations for reviewable access boundaries.