|
1 | | -version: 2 |
2 | | -contracts: |
3 | | - - git: |
4 | | - url: https://github.com/specmatic/specmatic-order-contracts.git |
5 | | - provides: |
6 | | - - specs: |
7 | | - - io/specmatic/examples/store/openapi/product_search_bff_v6.yaml |
8 | | - specType: openapi |
9 | | - config: |
10 | | - baseUrl: "{APP_URL:http://localhost:8080}" |
11 | | - examples: |
| 1 | +version: 3 |
| 2 | +systemUnderTest: |
| 3 | + service: |
| 4 | + $ref: "#/components/services/productSearchBffService" |
| 5 | + runOptions: |
| 6 | + $ref: "#/components/runOptions/productSearchBffServiceTest" |
| 7 | + data: |
| 8 | + examples: |
| 9 | + - directories: |
12 | 10 | - ./src/test/resources/bff |
13 | | - resiliencyTests: |
14 | | - enable: "all" # Resiliency tests mode for these specs |
15 | | - consumes: |
16 | | - - specs: |
17 | | - - io/specmatic/examples/store/openapi/api_order_v5.yaml |
18 | | - specType: openapi |
19 | | - config: |
20 | | - baseUrl: http://localhost:8090 |
| 11 | +dependencies: |
| 12 | + services: |
| 13 | + - service: |
| 14 | + $ref: "#/components/services/orderApiService" |
| 15 | + runOptions: |
| 16 | + $ref: "#/components/runOptions/orderApiServiceMock" |
| 17 | + data: |
21 | 18 | examples: |
22 | | - - ./src/test/resources/domain_service |
23 | | - - specs: |
24 | | - - io/specmatic/examples/store/asyncapi/kafka.yaml |
25 | | - specType: asyncapi |
26 | | - config: |
27 | | - inMemoryBroker: |
28 | | - host: localhost |
29 | | - port: 9092 |
30 | | - servers: |
31 | | - - host: localhost:9092 |
32 | | - protocol: kafka |
33 | | -hooks: |
34 | | - post_specmatic_response_processor: ./hooks/post_specmatic_response_processor.sh |
35 | | -report: |
36 | | - types: |
37 | | - APICoverage: |
38 | | - OpenAPI: |
39 | | - successCriteria: |
40 | | - minThresholdPercentage: 70 |
41 | | - maxMissedEndpointsInSpec: 0 |
42 | | - enforce: true |
43 | | -test: |
44 | | - filter: "PATH!='/health,/monitor/{id},/swagger'" |
45 | | - actuatorUrl: "{APP_URL:http://localhost:8080}/actuator/mappings" |
46 | | - resiliencyTests: |
47 | | - enable: all |
| 19 | + - directories: |
| 20 | + - ./src/test/resources/domain_service |
| 21 | + |
| 22 | + - service: |
| 23 | + $ref: "#/components/services/kafkaService" |
| 24 | + runOptions: |
| 25 | + $ref: "#/components/runOptions/kafkaServiceMock" |
48 | 26 |
|
49 | | -#examples: |
50 | | -# - /usr/src/app/src/test/resources/bff |
51 | | -# - /usr/src/app/src/test/resources/domain_service |
| 27 | + data: |
| 28 | + adapters: |
| 29 | + post_specmatic_response_processor: ./hooks/post_specmatic_response_processor.sh |
52 | 30 |
|
53 | | -#license_path: "/root/specmatic-license.txt" # License file path |
| 31 | +specmatic: |
| 32 | + governance: |
| 33 | + successCriteria: |
| 34 | + minCoveragePercentage: 70 |
| 35 | + maxMissedOperationsInSpec: 0 |
| 36 | + enforce: true |
| 37 | + settings: |
| 38 | + test: |
| 39 | + schemaResiliencyTests: all |
| 40 | +components: |
| 41 | + sources: |
| 42 | + specmaticOrderContracts: |
| 43 | + git: |
| 44 | + url: https://github.com/specmatic/specmatic-order-contracts.git |
| 45 | + services: |
| 46 | + productSearchBffService: |
| 47 | + description: Product Search BFF Service |
| 48 | + definitions: |
| 49 | + - definition: |
| 50 | + source: |
| 51 | + $ref: "#/components/sources/specmaticOrderContracts" |
| 52 | + specs: |
| 53 | + - io/specmatic/examples/store/openapi/product_search_bff_v6.yaml |
| 54 | + orderApiService: |
| 55 | + description: Order API Service |
| 56 | + definitions: |
| 57 | + - definition: |
| 58 | + source: |
| 59 | + $ref: "#/components/sources/specmaticOrderContracts" |
| 60 | + specs: |
| 61 | + - io/specmatic/examples/store/openapi/api_order_v5.yaml |
| 62 | + kafkaService: |
| 63 | + description: Kafka AsyncAPI Service |
| 64 | + definitions: |
| 65 | + - definition: |
| 66 | + source: |
| 67 | + $ref: "#/components/sources/specmaticOrderContracts" |
| 68 | + specs: |
| 69 | + - io/specmatic/examples/store/asyncapi/kafka.yaml |
| 70 | + runOptions: |
| 71 | + productSearchBffServiceTest: |
| 72 | + openapi: |
| 73 | + type: test |
| 74 | + baseUrl: "{APP_URL:http://localhost:8080}" |
| 75 | + filter: "PATH!='/health,/monitor/{id},/swagger'" |
| 76 | + actuatorUrl: "{APP_URL:http://localhost:8080}/actuator/mappings" |
| 77 | + orderApiServiceMock: |
| 78 | + openapi: |
| 79 | + type: mock |
| 80 | + baseUrl: http://localhost:8090 |
| 81 | + kafkaServiceMock: |
| 82 | + asyncapi: |
| 83 | + type: mock |
| 84 | + inMemoryBroker: |
| 85 | + host: localhost |
| 86 | + port: 9092 |
| 87 | + servers: |
| 88 | + - host: "localhost:9092" |
| 89 | + protocol: kafka |
0 commit comments