kevbite/CompaniesHouse.NET

Quickly respond to CH API changes

bernhard-dwe opened this issue · 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 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.

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?

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