Skip to content

Refactor container handling to include Technology attribute in multip…#169

Merged
SlavaVedernikov merged 4 commits intoSlavaVedernikov:masterfrom
mnadenysenko:168-csv-container-technology
Oct 16, 2025
Merged

Refactor container handling to include Technology attribute in multip…#169
SlavaVedernikov merged 4 commits intoSlavaVedernikov:masterfrom
mnadenysenko:168-csv-container-technology

Conversation

@mnadenysenko
Copy link
Copy Markdown
Contributor

Summary

Adds support for the Technology property in CSV Container definitions, bringing CSV format parity with JSON/YAML formats.

Closes #168

Changes Made

1. CSV Data Model

  • Added Technology property to CsvDataProvider.Container record (Index 4)
  • Updated property indices: Alias → Index 5, Description → Index 6

2. Interface Updates

  • Updated IAaCWriter.AddContainer() signature to include technology parameter
  • Updated all base writer classes to support the new parameter

3. Implementations Updated

Writers:

  • CsvToCSharpAaCWriter
  • YamlToCsvAaCWriter
  • CsvToJObjectAaCWriter
  • JsonToCSharpAaCWriter
  • CSharpToCSharpAaCWriter
  • CSharpToYamlAaCWriter

Generators:

  • CsvToCSharpAaCGenerator
  • CsvToYamlAaCGenerator
  • CsvToJsonAaCGenerator
  • YamlToCsvAaCGenerator
  • JsonToCSharpAaCGenerator

4. Sample Files

Updated example CSV files with technology values:

  • Samples/Internet Banking System/CSV/Architecture Catalogue - CSV Export/Containers.csv
  • Samples/TraderX/CSV/Architecture Catalogue - CSV Export/Containers.csv

Testing

  • ✅ Solution builds successfully
  • ✅ Verified technology values in sample files

Breaking Changes

⚠️ Yes - Existing Containers.csv files will need to add the Technology column in the correct position (after Type, before Alias).

Migration: Add an empty Technology column or populate with technology values:

Software System,Name,Type,Technology,Alias,Description
MySystem,API,Api,Java Spring Boot,MySystem.Containers.API,REST API

…le writers and update sample CSV files accordingly
Copy link
Copy Markdown
Owner

@SlavaVedernikov SlavaVedernikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's safe to change IAaCWriter
from
public IAaCWriter AddContainer(string softwareSystemName, string name, string? containerType = null, string? label = null, string? description = null);
to
public IAaCWriter AddContainer(string softwareSystemName, string name, string? containerType = null, string? technology = null, string? label = null, string? description = null);
by adding string? technology = null in the middle of arguments as all the arguments at the end are of string? data type, so if there are any uses, label can be confused for technology and description can be confused for label

Add string? technology = null to the end instead, please i.e.
public IAaCWriter AddContainer(string softwareSystemName, string name, string? containerType = null, string? label = null, string? description = null, string? technology = null);

@mnadenysenko
Copy link
Copy Markdown
Contributor Author

I don't think it's safe to change IAaCWriter from public IAaCWriter AddContainer(string softwareSystemName, string name, string? containerType = null, string? label = null, string? description = null); to public IAaCWriter AddContainer(string softwareSystemName, string name, string? containerType = null, string? technology = null, string? label = null, string? description = null); by adding string? technology = null in the middle of arguments as all the arguments at the end are of string? data type, so if there are any uses, label can be confused for technology and description can be confused for label

Add string? technology = null to the end instead, please i.e. public IAaCWriter AddContainer(string softwareSystemName, string name, string? containerType = null, string? label = null, string? description = null, string? technology = null);

This is all set with the latest commit.

@mnadenysenko
Copy link
Copy Markdown
Contributor Author

@SlavaVedernikov
Copy link
Copy Markdown
Owner

Please update the following Excel files:
https://github.com/SlavaVedernikov/C4InterFlow/blob/master/Templates/Architecture%20Catalogue.xlsm https://github.com/SlavaVedernikov/C4InterFlow/blob/master/Samples/TraderX/CSV/Architecture%20Catalogue.xlsm https://github.com/SlavaVedernikov/C4InterFlow/blob/master/Samples/Internet%20Banking%20System/CSV/Architecture%20Catalogue.xlsm
Add Technology column to the end please.
Also, update Batch_Export_CSV macro.

I am not able to make changes to Excel files, in my corporate environment, without also applying a Sensitivity Label. I don't have access to Excel from my home computer. Can you please make the changes to the excel files?

Sure, I'll take care of Excel files, no problem.

public string Type { get; set; }

[Name("Alias")]
[Name("Technology")]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add Technology field as the last field here i.e. with [Index(6)]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All set.

InternetBanking,Mobile App,Mobile,InternetBanking.Containers.MobileApp,
InternetBanking,API Application,Spa,InternetBanking.Containers.APIApplication,
InternetBanking,Database,Database,InternetBanking.Containers.Database,
Software System,Name,Type,Technology,Alias,Description
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move Technology to the end

TraderX,Trading Services,Api,TraderX.Containers.TradingServices,Service which provides trading services
TraderX,Accounts Service,Api,TraderX.Containers.AccountsService,Service which provides account management
TraderX,People Service,Api,TraderX.Containers.PeopleService,Service which provides user details management
Software System,Name,Type,Technology,Alias,Description
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move Technology to the end

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be all set. Apologies for not also making this change with the prior commit. I will try to be more careful in the future and take the time to test any changes with the samples. May be good to get some unit tests added to project down the road so changes can be tested in an automated way.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem :)
I agree about unit tests... We have a pull request for unit tests, but it requires some work. I'll try and pick it up some time soon.
Thanks

Copy link
Copy Markdown
Owner

@SlavaVedernikov SlavaVedernikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@SlavaVedernikov SlavaVedernikov merged commit 76a0260 into SlavaVedernikov:master Oct 16, 2025
@mnadenysenko mnadenysenko deleted the 168-csv-container-technology branch October 17, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Technology property support to CSV Container definitions

2 participants