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

feat: updated project structure and added basic test cases to project #13

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

k-avy
Copy link
Collaborator

@k-avy k-avy commented Jul 12, 2023

feat: updated the project structure and added test case

  • updated project structure to avoid import cycle

    • added a different package for database where:
      • there is function related to migration of database
      • and populating database
  • added basic test cases:

    • added API test cases for create, update, get license by shortname and search in licenses
    • added user test cases for create and get user by id
  • updated meta to pagination meta for better discription

@k-avy k-avy force-pushed the kavya/api/test branch 4 times, most recently from c9e5795 to fc71c22 Compare July 14, 2023 17:24
@k-avy k-avy force-pushed the kavya/api/test branch 3 times, most recently from 67389b1 to bec1cda Compare July 19, 2023 20:35
@sjha2048
Copy link

There can be some more changes in the project structure, let's go over it in our next call.
I will update this comment after our discussion.

@k-avy k-avy force-pushed the kavya/api/test branch 2 times, most recently from 1cb00d7 to 2929585 Compare July 28, 2023 20:34
    updated project structure to avoid import cycle
        added a different package for database where:
            there is function related to migration of database
            and populating database

    added basic test cases:
        added API test cases for create, update, get license by shortname and search in licenses
        added user test cases for create and get user by id

    updated meta to pagination meta for better discription

Signed-off-by: Kavya Shukla <[email protected]>
@k-avy k-avy requested review from avinal and GMishx August 10, 2023 12:04
Copy link
Member

@avinal avinal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the test command to the Github Actions as well.

Comment on lines +26 to +27
r.POST("/api/search", SearchInLicense)
r.GET("/api/licenses", FilterLicense)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create an issue to merge these two endpoints into a single one.

@@ -56,7 +56,7 @@ type LicenseJson struct {
// license retrieval operation.
// It contains information that provides context and supplementary details
// about the retrieved license data.
type Meta struct {
type PaginationMeta struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create an issue to make this struct as free form key-value mapping field

pkg/models/types.go Outdated Show resolved Hide resolved
Co-authored-by: Avinal Kumar <[email protected]>
Signed-off-by: Gaurav Mishra <[email protected]>
@GMishx GMishx merged commit b324a4d into fossology:main Dec 4, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants