openfga / vscode-ext

An OpenFGA extension for VS Code
https://openfga.dev
Apache License 2.0
14 stars 4 forks source link

list_users is not recognized in store.fga.yaml files #295

Closed aaguiarz closed 1 month ago

aaguiarz commented 2 months ago

When writing tests for list_users in the .fga.yaml file, the list_users key is not recognized in Visual Studio Code:

image
ewanharris commented 2 months ago

@aaguiarz do you have an older extension installed manually by chance? We added support in #232 and it appears functional for me in this store file

image

aaguiarz commented 2 months ago

I'm using v0.2.22, seems to be the latest one

image
aaguiarz commented 2 months ago

I see the error in that file too:

image
ewanharris commented 2 months ago

@aaguiarz I'm not really sure what would be the difference here as the extensions should functionally be the same. We just shipped 0.2.23 so could you try updating to that and see if the issue persists

Siddhant-K-code commented 2 months ago

@ewanharris, I think, it got broke in https://github.com/openfga/vscode-ext/pull/270 while migrating to @openfga/syntax-transformer. Because, in #270, we removed the schema file which also has ListUsersRequest which was introduced in #232, but can't find similar Lines of Code for list_users in the syntax-transformer package and neither in this file.

ewanharris commented 2 months ago

@Siddhant-K-code The store validation was moved across to language in openfga/language/pull/286, and for JS is in validate-store.ts which provides the validator.YamlStoreValidator() we now use.

ewanharris commented 1 month ago

Closing as confirmed no longer able to reproduce.