Base facility
Support status
Stable
The Base facility provides the platform-independent modeling foundation used by all other publicly documented JoinedWorkz facilities. It generates API specifications and diagrams, but no programming-language implementation or runnable server.
1. Maven artifact and platform
Add the facility to the model module:
<dependency>
<groupId>org.joinedworkz.facilities</groupId>
<artifactId>common-base</artifactId>
<version>${joinedworkz.version}</version>
<scope>provided</scope>
</dependency>The artifact contributes:
- profile package
org.joinedworkz.facilities.common.profiles.base; - platform
Base; - CMN package
org.joinedworkz.facilities.common.basewith common types; and - CMN package
org.joinedworkz.facilities.common.base.apiwith resource method types.
2. Supported modeling and generation
Base provides:
- simple types such as
String,Integer,Long,Decimal,Date,Time,Timestamp,Boolean,BinaryandId; - constraints and common stereotypes for types, fields, services, components and associations;
- raw HTTP method types
get,post,put,patchanddelete; - opinionated method types
create,start,execute,read,downloadText,update,deleteInstance,queryandlist; - model-scoped OpenAPI documents for non-abstract resources;
- additional component-scoped OpenAPI documents that aggregate all endpoints provided by a component; and
- HTML diagrams for types, components, APIs, applications, landscapes and modeled processes where the relevant CMN content exists.
The active cartridges are OpenApiCartridge and DiagramCartridge.
New models use the canonical Base property names min, max, maxDigits, decimals, pagination, and sort. See the property migration guide for deprecated compatibility names and the distinct paging behavior.
3. Public and advanced configuration
rest.useVendorSpecificMimeType— public; defaults tofalse. Enables vendor-specific REST media types unless the model overrides the behavior.openapi.qualifiedSchemaName— advanced; defaults tofalse. Uses qualified OpenAPI schema names.
Generic cartridge.<name>.enabled configuration can disable an active cartridge. Outlet directories can be changed with outlet.<outlet>.directory. See the joinedworkz.properties reference for parsing and precedence.
4. Outputs and ownership
All regular Base outputs are replaceable:
generatedOpenApidefaults tosrc/generated/resources/openapi;generatedOpenApiHtmldefaults todiagram/api; andgeneratedDiagramdefaults todiagram.
Change the CMN model or configuration and regenerate these files; do not edit them manually.
5. Minimal model
package com.example.greeting
import org.joinedworkz.facilities.common.base
import org.joinedworkz.facilities.common.base.api
platform Base
resource /hello as Greeting {
read()
}
type Greeting {
message: String
}6. Build and expected result
With the JoinedWorkz Maven plugin configured, run:
mvn clean packageThe default OpenAPI output for this model is:
src/generated/resources/openapi/com.example.greeting.yamlBase also writes the corresponding OpenAPI viewer and applicable diagram pages. It does not generate Java sources, application bootstrap code or a deployable service. Continue with Java or SpringBoot when implementation code is required.
7. Boundaries
- Base is technology-independent; it does not select a runtime framework.
- A component can aggregate endpoints from several provided resource models. Applications do not produce another application-wide OpenAPI aggregate.
- Base assigns no special meaning to individual layer names. The generic generator runtime nevertheless uses the model layer as the default effective layer for OpenAPI and diagram output.
- Every CMN package must have a unique technical namespace.
