Closed Tyler-IN closed 4 months ago
Working through test cases, adding one for an unofficial generated Twitch OpenAPI document.
public const string Primary(default) = "primary (default)";
Has additional scenarios such as the above.
Property name is still not sanitized here.
Found instances of PropertyData.Default with
skipping sanitization when assigning name, addressing...
UseWordSeparator would turn this into PrimaryDefault. Will it be better?
I'll extend the init helper to do what FromSchema does
Now to see what's causing the CI failures...
Difference in output in OpenApiGenerator.UnitTests.ClientTests.OpenAi
;
How do you want to address this @HavenDV ? Note the enums below too.
These tests are mainly for debugging/to see changes in data, so just accept the new changes or uncomment //.AutoVerify() before running and make sure there are no new diagnostics inside files like this Tests.YamlWithUrl_Diagnostics.verified.txt
Difference in output in
OpenApiGenerator.UnitTests.ClientTests.OpenAi
;How do you want to address this @HavenDV ? Note the enums below too.
It seems there is some kind of error with the OpenAI spec, and these models are skipped in the generation. I'll deal with this separately
Ok, with these changes CI should pass.
For note, the twitch integration tests are just placeholder filler.
The "test" was just compiling with the source generator.
The main place for testing in this project is the Snapshots tests, which compare the generated code and make sure that it does not produce any diagnostics (that is, it can compile). The tests here also allow you to debug the entire code, unlike integration tests, which use the generator itself without Roslyn
I will add twitch openapi spec to Snapshots tests little later today, I am at work now
See https://github.com/HavenDV/OpenApiGenerator/issues/14
This implements the proposal outlined in the issue.