CompaniesHouse.NET icon indicating copy to clipboard operation
CompaniesHouse.NET copied to clipboard

Quickly respond to CH API changes

Open bernhard-dwe opened this issue 2 years ago • 3 comments

I was considering adding a utility that could generate the enums from the CH specification.

It would be a CLI tool that generates the C# classes that define enums for the strings that CH support. It could have an option to apply the changes, with the default being to merely report on the differences.

Is this something you'd find useful?

bernhard-dwe avatar Aug 26 '22 07:08 bernhard-dwe

@bernhard-dwe the problem is that there are enums that come out and then it's normally months afterward that they're pushed to their GitHub repo. We've seen that in the past a lot.

I thought early on about creating a source generator to go grab all the enums and create the code for them on each build, but same problem as above. You can see passed issues that mention these problems too.

kevbite avatar Sep 03 '22 14:09 kevbite

My intention was to grab the strings from their API documentation, not their repo. Or is their documentation sometimes updated in arrears of their API?

bernhard-dwe avatar Sep 05 '22 09:09 bernhard-dwe

I've found that both the docs and their repo lacks behind when they add new enums

kevbite avatar Sep 05 '22 13:09 kevbite