Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.21k stars 745 forks source link

Add ability to report swagger issue directly from tooling #1113

Open alex-frankel opened 3 years ago

alex-frankel commented 3 years ago

If there is a warning for a missing type or a false positive due to an incorrect swagger definition, it would be nice to allow a report to be sent directly from the VS Code extension. A report could mean opening up an issue in the rest-api-spec repo.

We could also provide an ability to highlight a property name if there were enum values missing and the tooling should be able to provide a JSON path to the relevant swagger property.

majastrz commented 3 years ago

On the VS code side, we could probably have a code fix of some sort that triggers issue reporting. As far as the backend goes, it feels like a good fit for the existing VS code telemetry channels.

anthony-c-martin commented 3 years ago

Great suggestion - going from Bicep issue report to swagger issue today is definitely pretty laborious. Autorest should give us access to the source file & jpath to each property, so we definitely have the ability to emit this information during type generation. We'll probably need to put some thought into how this info can be accessed in the language server - the naïve approach of bundling everything into the types DLLs is going to cause them to get pretty large.

majastrz commented 3 years ago

Yeah, we will also have to solve that problem for descriptions as well. Maybe we need to do compressed JSON or BSON?