kevbite / CompaniesHouse.NET

A simple .NET client wrapper for CompaniesHouse API
MIT License
37 stars 44 forks source link

Quickly respond to CH API changes #187

Closed bernhard-dwe closed 5 months ago

bernhard-dwe commented 2 years ago

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?

kevbite commented 2 years ago

@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.

bernhard-dwe commented 2 years ago

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?

kevbite commented 2 years ago

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