Repository navigation
Expand file tree
/
Copy patho2j.yaml
More file actions
143 lines (135 loc) · 5.31 KB
/
Copy patho2j.yaml
File metadata and controls
143 lines (135 loc) · 5.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# O2J — OpenAPI to Java Spring Boot conversion factory
# Single source of truth for versions, targets and gate thresholds.
# See SPECIFICATION.md §8.2. Validated against o2j/schemas/o2j-config.schema.json.
version: 1
service:
name: order-service
group_id: com.acme.commerce
artifact_id: order-service
base_package: com.acme.commerce.order
profile: production # production | sandbox
target:
java_version: 21 # Tier 1: 17, 21, 25 | Tier 2 (best effort): 23, 26, 27
spring_profile: spring-boot-3 # spring-boot-3 | spring-boot-4
build_tool: maven
web_stack: mvc
# Pinned versions. Never inline a version anywhere else.
# Refresh with: o2j doctor --check-versions
versions:
openapi_generator: 7.27.0
spring_boot: 3.5.16 # NOTE: OSS EOL 2026-06-30. See SPECIFICATION.md §3.1 (RISK-01).
spring_boot_4: 4.1.0
mapstruct: 1.6.3
jacoco: 0.8.13
pitest: 1.17.4
pitest_junit5: 1.2.1
spotless: 2.44.0
checkstyle: 3.6.0
pmd: 3.26.0
spotbugs: 4.8.6.6
archunit: 1.3.0
testcontainers: 1.20.6
springdoc: 2.7.0 # Spring Boot 3 line
springdoc_boot_4: 3.0.3 # Spring Boot 4 line (used by the spring-boot-4 profile)
owasp_dependency_check: 11.1.0
cyclonedx: 2.9.1
spectral_cli: 6.11.1 # `o2j lint` runs Spectral via npx at this version
sonar_maven_plugin: 4.0.0.4121 # `o2j quality` when quality.sonar.enabled
openapi:
# A single spec file, or a folder. `o2j run` converts every *.yaml / *.yml in the folder into
# its own service, named after the file (openapi/orders.yaml -> generated_Code/orders/).
# Single-stage commands (o2j ingest, validate, ...) need a file: pass it, or keep one spec here.
input: openapi
canonical_version: "3.1.2"
allow_remote_refs: false
remote_ref_allowlist: []
max_inline_schemas: 0
max_allof_depth: 3
max_document_bytes: 10485760 # 10 MiB
validation:
# House rules for `o2j lint` (Spectral or vacuum) and, via .spectral.yaml, for editors.
# `o2j validate` - the blocking gate - implements the same rules in Python.
spectral_ruleset: o2j/rules/spectral/house-api.yaml
fail_on: error # error | warn
# The released spec(s) to check for breaking changes (O2J-V-011): a file, or a folder with
# a same-named file per spec in openapi/ (e.g. a checkout of the last release's openapi/).
# null = off. `--baseline <path>` on `o2j validate` / `o2j run` overrides it per run.
breaking_change_baseline: null
breaking_change_severity: null # error | warn | null (= error in production, warn otherwise)
require_security: true
require_pagination_on_collections: true
require_problem_details: true
generation:
delegate_pattern: true
interface_only: false
use_tags: true
use_optional: false
use_bean_validation: true
perform_bean_validation: true
open_api_nullable: false
hide_generation_timestamp: true # MUST remain true — determinism gate depends on it
serializable_model: true
unhandled_exception: true
documentation_provider: springdoc
annotation_library: swagger2
template_overrides: o2j/templates
output_dir: target/generated-sources/openapi # inside each service folder
# Generated services land here, one Maven project per service: <service_root>/<artifact_id>/.
# Folder runs (`o2j run openapi`) use the spec's file name as the artifact_id.
service_root: generated_Code
quality:
coverage:
line_min: 85
branch_min: 80
service_layer_line_min: 90
exclude:
- "**/api/model/**"
- "**/api/*Api.class"
- "**/api/*ApiController.class"
- "**/Application.class"
- "**/config/**"
mutation:
enabled: true
threshold: 70
coverage_threshold: 85
target_packages:
- "com.acme.commerce.order.service.*"
static_analysis:
spotless: true
checkstyle: true
pmd: true
spotbugs: true
archunit: true
owasp_dependency_check: true
gitleaks: true
# SonarQube / SonarCloud, run by `o2j quality` after the build. The token is read from
# $SONAR_TOKEN, never from this file. Fails on the server's quality gate.
sonar:
enabled: false
project_key: ""
host_url: "" # empty: $SONAR_HOST_URL, else https://sonarcloud.io
organization: "" # SonarCloud only
# TIBCO EMS request/reply queues this service replaces. When enabled, o2j validates the mapping
# against the spec at plan time and generates an EMS bridge (EmsBridge) that keeps legacy
# consumers working while they move to HTTP, plus a contract test for it on an embedded broker.
# See README, "Replacing TIBCO EMS queues".
ems:
enabled: false
reply_timeout_ms: 5000 # default reply deadline; a slower call replies 504/TIMEOUT
routes: []
# routes:
# - destination: ORDERS.CREATE.REQUEST
# operation: createOrder
# correlation: message-id # message-id | correlation-id
# reply_timeout_ms: 3000
# params: # HTTP parameter -> where it comes from in the message
# Idempotency-Key: jms:JMSMessageID
# faults: # HTTP status -> legacy fault code consumers expect
# 409: ORD-DUPLICATE
# - destination: ORDERS.GET.REQUEST
# operation: getOrder
# correlation: correlation-id
# params:
# orderId: json:/orderId # JSON pointer into the message body
# faults:
# 404: ORD-NOT-FOUND