Skip to content

Commit 9a09fae

Browse files
test: inline .avsc schema refs to prevent flaky Kafka tests (#1744)
Co-authored-by: SanidhyaMadheshia <sanidhyamadheshia@gmail.com>
1 parent adca1e4 commit 9a09fae

File tree

1 file changed

+176
-2
lines changed

1 file changed

+176
-2
lines changed

packages/templates/clients/kafka/test/__fixtures__/asyncapi-adeo.yml

Lines changed: 176 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,89 @@ components:
207207
payload:
208208
schemaFormat: application/vnd.apache.avro;version=1.9.0
209209
schema:
210-
$ref: "https://www.asyncapi.com/resources/casestudies/adeo/CostingRequestPayload.avsc"
210+
# $ref: "https://www.asyncapi.com/resources/casestudies/adeo/CostingRequestPayload.avsc"
211+
namespace: com.adeo.casestudy.costingrequest
212+
type: record
213+
name: CostingRequestPayload
214+
version: 1.1.0
215+
fields:
216+
- name: ProductId
217+
type:
218+
type: string
219+
avro.java.string: String
220+
doc: Product identifier.
221+
- name: ShortProductDescription
222+
type:
223+
- 'null'
224+
- type: string
225+
avro.java.string: String
226+
doc: A short product description.
227+
example: BOTTLE RACK, STACKABLE, 2 TIER, 10 BOTTLES
228+
- name: SupplierCode
229+
type:
230+
type: string
231+
avro.java.string: String
232+
doc: Supplier code, used to get parameter values that depend on the supplier.
233+
example: '12345678'
234+
- name: SupplierPrice
235+
type: float
236+
doc: Product price (purchasing price).
237+
- name: Unit
238+
doc: Unit characteristics
239+
type:
240+
name: UnitItem
241+
namespace: com.adeo.casestudy.costingrequest
242+
type: record
243+
fields:
244+
- name: Length
245+
type: float
246+
example: 1.11
247+
exclusiveMinimum: 0
248+
- name: Width
249+
type: float
250+
example: 1.11
251+
exclusiveMinimum: 0
252+
- name: Height
253+
type: float
254+
example: 1.11
255+
exclusiveMinimum: 0
256+
- name: WeightGross
257+
type: float
258+
example: 6.68
259+
exclusiveMinimum: 0
260+
- name: WeightNet
261+
type: float
262+
example: 6.68
263+
exclusiveMinimum: 0
264+
doc: The unit of net weight is the kilogram
265+
- name: BusInputs
266+
type:
267+
type: array
268+
doc: Business units specific data required to deduce the right BU context.
269+
minItems: 1
270+
items:
271+
name: CostingRequestBUItem
272+
namespace: com.adeo.casestudy.costingrequest
273+
type: record
274+
fields:
275+
- name: ClientCode
276+
type:
277+
type: string
278+
avro.java.string: String
279+
doc: The client (Business Unit) code.
280+
example: '1'
281+
- name: ContainerType
282+
type:
283+
- 'null'
284+
- type: enum
285+
namespace: com.adeo.casestudy.model
286+
name: ContainerTypeItems
287+
doc: Container selected for transportation. Required to determinate parameter values that rely on transportation. **Will be deleted (because deduced) in future versions**
288+
symbols:
289+
- FT20
290+
- FT40
291+
- FT40HC
292+
- TRUCK
211293
costingResponse:
212294
name: CostingResponse
213295
title: Costing Response
@@ -242,7 +324,99 @@ components:
242324
payload:
243325
schemaFormat: application/vnd.apache.avro;version=1.9.0
244326
schema:
245-
$ref: "https://deploy-preview-921--asyncapi-website.netlify.app/resources/casestudies/adeo/CostingResponsePayload.avsc"
327+
# $ref: "https://deploy-preview-921--asyncapi-website.netlify.app/resources/casestudies/adeo/CostingResponsePayload.avsc"
328+
namespace: com.adeo.casestudy.costingresponse
329+
type: record
330+
name: CostingResponsePayload
331+
version: 1
332+
fields:
333+
- name: CostingResult
334+
type:
335+
- 'null'
336+
- name: CostingResultItem
337+
namespace: com.adeo.casestudy.costingresponse
338+
type: record
339+
doc: Costing result data
340+
fields:
341+
- name: CalculationPrice
342+
type: float
343+
doc: The calculated price.
344+
example: 1.136
345+
- name: CalculationCurrency
346+
doc: The currency for the calculation price.
347+
type:
348+
name: CalculationCurrencyItems
349+
namespace: com.adeo.casestudy.costingresponse
350+
type: enum
351+
symbols:
352+
- USD
353+
- EUR
354+
- CNY
355+
default: EUR
356+
- name: CalculationDetails
357+
type:
358+
name: CostingResultDetailsItems
359+
namespace: com.adeo.casestudy.costingresponse
360+
type: array
361+
items:
362+
name: CostingResultDetailsItem
363+
namespace: com.adeo.casestudy.costingresponse
364+
type: record
365+
doc: Cost Component used during the calculation
366+
fields:
367+
- name: Code
368+
type:
369+
type: string
370+
avro.java.string: String
371+
doc: The Cost Component Code.
372+
example: CODE1
373+
- name: Formula
374+
type:
375+
type: string
376+
avro.java.string: String
377+
doc: The Cost Component Formula.
378+
example: PARAM1 / PARAM2
379+
- name: Value
380+
type: float
381+
doc: Cost component calculated value.
382+
example: 1.145
383+
- name: CostingErrors
384+
doc: Technical or functional errors occurred during calculation
385+
type:
386+
- 'null'
387+
- type: array
388+
name: CostingErrorItems
389+
namespace: com.adeo.casestudy.costingresponse
390+
items:
391+
name: CostingErrorItem
392+
namespace: com.adeo.casestudy.costingresponse
393+
type: record
394+
doc: Costing errors data
395+
fields:
396+
- name: Type
397+
type:
398+
name: CostingErrorTypeItems
399+
namespace: com.adeo.casestudy.costingresponse
400+
type: enum
401+
symbols:
402+
- TECHNICAL
403+
- FUNCTIONAL
404+
default: FUNCTIONAL
405+
- name: Code
406+
type:
407+
type: string
408+
avro.java.string: String
409+
doc: Error codification
410+
- name: Step
411+
type:
412+
type: string
413+
avro.java.string: String
414+
doc: Costing step where the error occurred
415+
- name: Description
416+
type:
417+
type: string
418+
avro.java.string: String
419+
doc: Error description
246420
schemas:
247421
RequesterId:
248422
type: string

0 commit comments

Comments
 (0)