Open
Description
Clear and concise description of the problem
People may have JSON on hand when trying to create examples for their models, but examples are expected to be values.
It would be nice if the existing "convert to an object value" code fix that handles when you drop a model into a spot designated for a value [Playground]:
@example(#{"Baz": "Hello"})
model FooBar { Baz : string; }
would turn it into a value
@example(#{Baz: "Hello"})
instead of to an invalid value [Playground]:
@example(#{"Baz": "Hello"})
This would ease migrations to TypeSpec while removing a case where a codefix leaves invalid code after being applied.
Checklist
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment