Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing imposters validation #166

Open
joanlopez opened this issue Apr 11, 2024 · 8 comments
Open

Add missing imposters validation #166

joanlopez opened this issue Apr 11, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@joanlopez
Copy link
Member

There are edge cases that aren't properly handled, that should be reviewed and managed adequately.
For instance, what if the response field is empty, or it's an empty or null array.

We should try to:

  • List all the possible edge cases first
  • Define how these should be managed (errors, etc)
  • Adjust existing tests accordingly, add new ones.
@joanlopez joanlopez added enhancement New feature or request good first issue Good for newcomers labels Apr 11, 2024
@joanlopez joanlopez self-assigned this Apr 11, 2024
@yumski
Copy link

yumski commented May 26, 2024

Hey @joanlopez does this issue still need to be worked on? Will be happy to contribute if this still needs to be worked on.

@joanlopez
Copy link
Member Author

Hey @yumski,

Sure, yes - please do it. I can even try to bring some help if needed.
As suggested, I'd start by going over the code base and different features, and try to build a list.
Then, we can analyze what would make sense and what not.

Thanks! 🙇🏻

@Npsolver
Copy link

Hey @joanlopez,

I'd like to contribute to this project. Is this still being worked on? If yes I'll try making a list of edge cases.

@joanlopez
Copy link
Member Author

I'd like to contribute to this project. Is this still being worked on? If yes I'll try making a list of edge cases.

Of course! I haven't seen any progress from @yumski, so feel free to start working on it!

@Npsolver
Copy link

Hey @joanlopez,

I was going through the code and how the components work. I was trying out building a test server using the files under the folder internal/server/http/test/testdata/. But when I tested the endpoint /gophers it gave me:

2024/07/27 19:08:21 stat schemas/create_gopher_request.json: no such file or directory: the schema file schemas/create_gopher_request.json not found

whereas the file does exist. I'm not sure what the fix for this is. Can I get some help? Thanks.

@joanlopez
Copy link
Member Author

Hey @Npsolver,
It looks like you caught a bug from one of our recent refactors, where we eliminated the afero dependency.
Thanks for reporting it! Changes on #173 should make it work! 💪🏻

@Npsolver
Copy link

Hey @joanlopez, found a typo here:

schemaFilePath, _ := filepath.Abs(schemaFile)

The _ should be replaced with err.

@joanlopez
Copy link
Member Author

Hey @joanlopez, found a typo here:

schemaFilePath, _ := filepath.Abs(schemaFile)

The _ should be replaced with err.

Great catch @Npsolver, I have added it as part of #173.
Thanks for pointing out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants