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

Forms Base APIs Created & Tests structure fixed #31

Merged
merged 20 commits into from
Feb 18, 2024
Merged

Conversation

ivinayakg
Copy link
Contributor

@ivinayakg ivinayakg commented Feb 16, 2024

Date: 18/02/24

Developer Name: Vinayak Goyal


Issue Ticket Number

Description

  • Create Base form APIs
  • Fix testing structure.
  • Create API documentation (postman collection)

Routes

  • POST /v1/forms, to create a form.
  • GET /v1/forms, to create all forms.
  • GET /v1/forms/:id, to get a form by Id.
  • PATCH /v1/forms/:id, to update a form by Id.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

Test Coverage

Screenshot 1

image
image

Additional Notes

@ivinayakg ivinayakg changed the title Forms Base APIs Created [DRAFT] Forms Base APIs Created & Tests structure fixed Feb 17, 2024
yesyash
yesyash previously approved these changes Feb 18, 2024
tests/integration/utils_test.go Show resolved Hide resolved
tests/integration/utils_test.go Outdated Show resolved Hide resolved
tests/integration/utils_test.go Show resolved Hide resolved
tests/integration/form_test.go Show resolved Hide resolved
tests/integration/form_test.go Show resolved Hide resolved
src/routes/forms.go Outdated Show resolved Hide resolved
src/routes/forms.go Show resolved Hide resolved
src/routes/forms.go Show resolved Hide resolved
src/routes/forms.go Show resolved Hide resolved
src/routes/forms.go Outdated Show resolved Hide resolved
@yesyash yesyash added this pull request to the merge queue Feb 18, 2024
Merged via the queue into develop with commit f706bb5 Feb 18, 2024
1 check passed
@yesyash yesyash deleted the feat/base-form-APIs branch February 18, 2024 20:16
github-merge-queue bot pushed a commit that referenced this pull request Apr 7, 2024
* feat: dtos for form create & update API

* refact: suggested changes for API dtos

* feat: added errorResponse Dto

* refact: removed comments from dtos

* feat: add docker config for postgresql

* feat: draft dtos for new schema

* refact: removed docker-compose and fix naming for DTOs

* refact: changes suggested by @yesyash

* refact: name fix for requests Dto

* refact: responses dtos changes

* refact: change form dtos

* feat: added form meta Dto

* refact: fix form dto name

* feat: created form Create/Read/Update APIs

* fix: bugs for forms base API and API documentation

* fix: testing structure fixed & forms tests written

* refact: suggested changes by @yesyash

* refact: suggested improvements by @prakashchoudhary07
@yesyash yesyash mentioned this pull request May 20, 2024
github-merge-queue bot pushed a commit that referenced this pull request May 20, 2024
* Initialize project with go mod init & add .vscode, .gitignore & .gitattributes

* Add Gin package and create test routes

* Create routes folder

* Add Air, README & remove non required extensions from .vscode/settings.json

* Add Bun ORM and godotenv package to load env files

* Update readme

* Add Modals to folder structure in readme

* Add initial migrations and update readme to include `Golang Migrations`  (#7)

* change localhost to 127.0.0.1

* Create initial migrations and updated users model

* update readme

* Create Login/signup endpoint for google auth (#9)

* Add a test for users get users routes

* Add the testify/assert package

* create api routes for google oauth

* Setup google o auth

* Add unique constraint to email in users model

* Create function to generate jwt token

* Add verify token util

* Modify todo comment

* Pick maxDbConnections from env, Change return type of getUserInfoFromCode to throw error

* Add max db open connections to env

* change utc time format to RFC3339

* Create workflow to run unit test on each pr (#12)

* Create workflow to run test on each pr

* Update workflow name

* feat: docker setup for main and test DB (#27)

* feat: docker setup for main and test DB

* feat: update documentation to use local DB

* Setup Development environment and update README (#29)

* move all folder to src and create health check route

* add a makefile

* create docker compose for dev

* wite commands for setup

* ad ability to create multiple databases from docker file

* update readme

* update the test db url

* add steps to connect to db

* update spacing between images

* update health check route

* remove test db from docker compose

* feat: migrations and struct created for form, metadata, responses schema (#23)

* feat: migrations and struct created for form, question, option schema

* refact: made chnages according to the new Schema

* refact: fix forms struct and migrations

* refact: change form meta data table name

* refact: created form schema for form realted tables

* feat: add json meta data into form structs

* fix: typo in migration

* refact: added updatedBy field in forms and form meta data schema

* feat: change updatedById type as pointer

* feat: dtos for form create & update API (#21)

* feat: dtos for form create & update API

* refact: suggested changes for API dtos

* feat: added errorResponse Dto

* refact: removed comments from dtos

* feat: add docker config for postgresql

* feat: draft dtos for new schema

* refact: removed docker-compose and fix naming for DTOs

* refact: changes suggested by @yesyash

* refact: name fix for requests Dto

* refact: responses dtos changes

* refact: change form dtos

* feat: added form meta Dto

* refact: fix form dto name

* fix: removed status from create form Dto

* fix: added status in update form Dto

* feat: make the status on update form request Dto nullable

* Forms Base APIs Created & Tests structure fixed (#31)

* feat: dtos for form create & update API

* refact: suggested changes for API dtos

* feat: added errorResponse Dto

* refact: removed comments from dtos

* feat: add docker config for postgresql

* feat: draft dtos for new schema

* refact: removed docker-compose and fix naming for DTOs

* refact: changes suggested by @yesyash

* refact: name fix for requests Dto

* refact: responses dtos changes

* refact: change form dtos

* feat: added form meta Dto

* refact: fix form dto name

* feat: created form Create/Read/Update APIs

* fix: bugs for forms base API and API documentation

* fix: testing structure fixed & forms tests written

* refact: suggested changes by @yesyash

* refact: suggested improvements by @prakashchoudhary07

* Create a common config to read env values & logger package (#39)

* add logger package

* creat a config package to read all env variables from

* add cases for tests in core config

* fix integrations tests not running on mac

* add command to display env

* print current dir

* add a test.env file

* add env to go test command

* add env and verbose to test workflow

* remove whitespace

* add postgres to test workflow (#40)

* add postgres to test workflow

* revert workflow name

* break unit and integration test into separate commands (#41)

* createa a release docker file and update the listener port to 0.0.0.0

* create a release docker file (#42)

* createa a release docker file and update the listener port to 0.0.0.0

* add comments to release docker file

* take build args in the release docker file

* remove build args from release docker & create a health check route

* change the route group prefix from v1 to wisee/v1 (#43)

* change the route group prefix from v1 to wisee/v1

* update the workflow to deploy to ecs

* add new branch

* reduce docker image size

* chore: add platform

* update go arch and goos

* remove unused comment

* set wait for service stability to false

* add error log in health check route

* add workflow dispatch

* remove revision file

* change trigger from dev to develop

* make a get call to google.com

* remove get call to google

* clean up verify token function and add a issued at time (#45)

* clean up verify token function and add a issued at time

* change jwt validity to days from hours

* make a get call to google.com

* remove ping to google in health check

---------

Co-authored-by: Prakash <[email protected]>

---------

Co-authored-by: Prakash <[email protected]>

* log jwt validity in unit tests

* update dev and test env

* uncommment integration tests

---------

Co-authored-by: Prakash <[email protected]>

* remove old migrations

---------

Co-authored-by: Vinayak Goyal <[email protected]>
Co-authored-by: Prakash <[email protected]>
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.

Forms Base APIs Fix tests structure.
3 participants