ASCOMInitiative / ASCOMRemote

The ASCOM REST based Remote Driver Server and Remote Access Clients
GNU General Public License v3.0
57 stars 15 forks source link

More precise way to hide the noisy types #59

Closed RReverser closed 2 weeks ago

RReverser commented 2 weeks ago

Fixup for the last-minute issue introduced and mentioned in https://github.com/ASCOMInitiative/ASCOMRemote/pull/58#issuecomment-2315012491

image

integer | integer | ... are still hidden where they don't add any new information, but string and other types are fixed and shown again.

RReverser commented 2 weeks ago

Now that only one of type and format is shown (whichever is more precise), I made them look the same as well:

image

RReverser commented 2 weeks ago

I also fixed .gitattributes in the repo - I noticed Github hides diffs for index.html like in my PR here, because they were marked as autogenerated.

Since the purpose of that attribute was to just hide HTML/CSS from language stats, I changed it to linguist-documentation instead which seems more appropriate and will do just that: show diffs but don't count in stats.

RReverser commented 2 weeks ago

@Peter-Simpson Ok I think I'm done for now, this is ready for review.

Peter-Simpson commented 2 weeks ago

Thanks for tidying this up Ingvar. I've just completed most of the the Platform 7 updates and will merge your changes into that. Please can you hold off from any further updates until tomorrow so I can get our changes correctly merged and committed.

Thanks, Peter

RReverser commented 2 weeks ago

Sure thing. The yaml as it stands now is sufficient for me, and I can use it to autogenerate all the types for my Rust library (https://github.com/RReverser/ascom-alpaca-rs) with no issues, but I'll look at the new updates when they land.

Peter-Simpson commented 2 weeks ago

That took less time than I thought, so happy days, changes now committed! 😁

I've added the small number of Platform 7 properties and methods, most of which are methods with no return type or properties with boolean return types. I'd appreciate you having a look at DeviceState in the common properties section because it is unique in returning a collection of different device state objects depending on whether each individual property is a bool, float, string etc.

I've used the anyOf keyword to describe the possible schemas that may appear in the collection, but don't know how this is going to play out in your tooling.

The updated version is online at Platform 7 Swagger.

RReverser commented 1 week ago

@Peter-Simpson Only just got around to this, reviewing now.