You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the tsp compiler from github actions it produced an invalid openapi file. When I try to parse that schema in to https://editor.swagger.io/ it gives me compile erros.
I am trying to compare a typespec generated openapi file with my dotnet project's openapi file. Using json2yaml and openapi-diff. When parsing to openapi-diff I get a parse error. Also errors are occuring on the editor.swagger.io.
Then I started comparing the output files from the github actions container (running the action locally with act) and also the output from running it from windows.
Below is from my scenario, but in the reproduction section I show the issue with the different output.
@royberris the problem here seems to be it is loading the global compiler version you have instead of hte one defined in the typespec folder. I think as a workaround for now you can run tsp compile . from the typespec folder instead of above
@timotheeguerin that does seem to resolve the issue. But still unexpected that it outputs that WeatherResult object with the extra value property and the kind properties. Is this because when it is outside the typespec folder it doesn't know the configuration etc?
That is an issue because it is doing some instance of comparaison but loading a différent version of the class. Will keep it open because there is a few things we can do here.
Have the openapi emitter create its own emitter framework
…directly (microsoft#3516)
fixmicrosoft#3397
Problem with calling `getAssetEmitter` is it create an asset emitter
with the instance of the compiler used in the compilation and not the
instance of the compiler defined in the type emitter necessarly. This
cause issue with `instanceof` checks which are then not the exact same
class as its loaded form different instance of the compiler
Calling `createAssetEmitter` solve the issue because it is imported in
teh context of the emitter package and will use the emitter package
version
Describe the bug
When running the tsp compiler from github actions it produced an invalid openapi file. When I try to parse that schema in to https://editor.swagger.io/ it gives me compile erros.
I am trying to compare a typespec generated openapi file with my dotnet project's openapi file. Using
json2yaml
andopenapi-diff
. When parsing toopenapi-diff
I get a parse error. Also errors are occuring on the editor.swagger.io.Then I started comparing the output files from the github actions container (running the action locally with act) and also the output from running it from windows.
Below is from my scenario, but in the reproduction section I show the issue with the different output.
All code is here: https://github.com/royberris/TypeSpec.NET
You can see the pipeline failing: https://github.com/royberris/TypeSpec.NET/actions/runs/9169657101/job/25210475358
Reproduction
Workflow:
The main.tsp
The config
The output running TypeSpec from a windows environment:
Running it from the github actions:
Checklist
The text was updated successfully, but these errors were encountered: