Skip to content

ARCP 0001: Standard Microservice and Converter Blueprint

Author: Emir Boyacı

The Standard Microservice and Converter Blueprint defines the canonical project layout, dependency inheritance, request validation, schema mapping, and downstream client conventions across the three AirCommerce backend runtime tiers:

  1. Versioned NDC Converter Services (service-converter-ndc24, service-converter-ndc192): Authenticate external requests via Core Library, validate inbound NDC XML/JSON payloads, perform pure schema conversion between IATA NDC models and model-one-order, and delegate to the Business Orchestrator.
  2. Business Orchestrator Service (service-business-orchestrator): Executes stateless retailing business rules (fare bundling, price-class enrichment, channel/tour-operator resolution) over model-one-order DTOs using dynamic tenant parameters from Configuration Util.
  3. External PSS Connectors (service-connector-iflyres): Perform pure schema and protocol conversion between model-one-order and external PSS SOAP/HTTP models (model-pss-iflyres), translating SOAP faults and HTTP errors into canonical exceptions.

Use this pattern whenever scaffolding a new microservice or implementing a vertical capability slice (such as OrderRetrieve/OrderView, AirShopping, OfferPrice, or OrderCreate) across Converter, Orchestrator, or Connector repositories.

  • Every microservice pom.xml MUST inherit from one.aircommerce.pom:boot-base-super-pom (ADR 0005).
  • Do not redeclare dependencies already provided by Core Library (spring-boot-starter-webmvc, spring-cloud-starter-openfeign, spring-boot-starter-oauth2-resource-server, lombok) or Test Support Library (wiremock-spring-boot, testcontainers).
  • Declare only tier-specific schema artifacts (model-one-order, model-ndc24, model-ndc192, or model-pss-iflyres) and one.aircommerce.util:configuration-util.

All microservices follow the root package convention one.aircommerce.service.<tier>.<name>:

one.aircommerce.service.<tier>.<name>
├── client/ # OpenFeign interfaces for downstream service or SOAP communication
├── config/ # ConfigBean (@ConfigurationValue fields), CustomGlobalExceptionHandler, Feign decoders
├── constant/ # ErrorConstant enums and domain constants
├── controller/ # REST controllers (@RestController)
├── exception/ # Tier-specific exceptions extending ServiceException
├── mapper/ # Pure mapper interfaces and implementations ( + mapper/util/ helpers)
├── service/ # Use-case interfaces and service/impl/ implementations
└── validation/ # Request validators and @ValidateNDCRequest aspect (in Converter services)
  • Converter Controllers (service-converter-ndc*) MUST consume and produce both MediaType.APPLICATION_XML_VALUE and MediaType.APPLICATION_JSON_VALUE on their @RequestMapping endpoints so aggregators can transact in either XML or JSON.
  • Internal Controllers (service-business-orchestrator and service-connector-iflyres) exchange model-one-order JSON payloads wrapped in or aligned with BaseResponse / ServiceException contracts from Core Library.

4. Aspect-Driven Request Validation (@ValidateNDCRequest)

Section titled “4. Aspect-Driven Request Validation (@ValidateNDCRequest)”
  • In service-converter-ndc*, structural and format validation of inbound NDC payloads is triggered declaratively via @ValidateNDCRequest (ValidationAspect + ValidatorRegistry + operation-specific NDCRequestValidator<T> implementations) before mapper execution.
  • Business rules that depend on tenant configuration or PSS state belong in service-business-orchestrator, never inside Converter validators or Connector mappers.
  • Converters (service-converter-ndc*) and Connectors (service-connector-iflyres) MUST implement strictly pure field and structure mappings as documented in the Architecture Portal’s Schema Mappings (x-ndc24, x-ndc192, and x-external).
  • Mappers are stateless Spring @Component classes (<Operation>Mapper / <Operation>MapperImpl) backed by focused utility classes (TimezoneUtils, DataUtil) and deterministic unit tests.

6. Dynamic Configuration & Exception Handling

Section titled “6. Dynamic Configuration & Exception Handling”
  • Dynamic tenant properties are injected into ConfigBean using @ConfigurationValue from Configuration Util with safe local fallback defaults (ADR 0003).
  • Each service defines a CustomGlobalExceptionHandler extending GlobalExceptionHandler from Core Library to translate tier-specific faults (e.g., IFlyResSoapFaultException or NotValidRequestException) into standardized error responses.
  • Controller and client integration tests extend BaseControllerTest from Test Support Library and stub downstream HTTP/SOAP calls using WireMock fixtures under src/test/resources/wiremock/.