feature/#127-parking-api-mockup #174

Closed
a24sakma wants to merge 0 commits from feature/#127-parking-api-mockup into team_1_week_1
Collaborator

Changes in this pr

  1. New Parking Api Mockup added
  2. It is built to handle request from frontend
  3. A sample for making request from frontend is added
  4. It uses docker
  5. a README guide is added with examples and notes on how it works
# Changes in this pr 1. New Parking Api Mockup added 2. It is built to handle request from frontend 3. A sample for making request from frontend is added 4. It uses docker 5. a README guide is added with examples and notes on how it works
Author
Collaborator

The files that needs review :

  1. DockerCompose/compose.yaml
  2. ParkingApiMockup/Dockerfile
  3. ParkingApiMockup/Program.cs
  4. ParkingApiMockup/README.MD
  5. ParkingApiMockup/Spot.cs
  6. ParkingApiMockup/SpotGenerator.cs
  7. entryPoint/nginx.conf
  8. frontend/nginx.conf
  9. frontend/src/features/parking/ParkingView.js
  10. frontend/src/features/parking/useParking.js

The files that are part of dotnet project configuration that simply you can ignore:

  1. ParkingApiMockup/ParkingApiMockup.csproj
  2. ParkingApiMockup/Properties/launchSettings.json
  3. ParkingApiMockup/appsettings.Development.json
  4. ParkingApiMockup/appsettings.json
The files that needs review : 1. DockerCompose/compose.yaml 2. ParkingApiMockup/Dockerfile 3. ParkingApiMockup/Program.cs 4. ParkingApiMockup/README.MD 5. ParkingApiMockup/Spot.cs 6. ParkingApiMockup/SpotGenerator.cs 7. entryPoint/nginx.conf 8. frontend/nginx.conf 9. frontend/src/features/parking/ParkingView.js 10. frontend/src/features/parking/useParking.js The files that are part of dotnet project configuration that simply you can ignore: 1. ParkingApiMockup/ParkingApiMockup.csproj 2. ParkingApiMockup/Properties/launchSettings.json 3. ParkingApiMockup/appsettings.Development.json 4. ParkingApiMockup/appsettings.json
Author
Collaborator

The issues that can be closed after review and merge:

  1. #42
  2. #127
The issues that can be closed after review and merge: 1. https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/42 2. https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/127
Collaborator

Assigned Hugo to review this issue.

Assigned Hugo to review this issue.
Collaborator

After looking over the changes I don't see any issues that stands out. It follows the standards, is commented where needed and has a very detailed and easy-to-follow README file.

I switched to the branch on my local computer, followed the README instructions to test the new function, and it seems to work without any issues. I got this result from the test code that you insert in frontend/src/app/App.js:

image

After looking over the changes I don't see any issues that stands out. It follows the standards, is commented where needed and has a very detailed and easy-to-follow README file. I switched to the branch on my local computer, followed the README instructions to test the new function, and it seems to work without any issues. I got this result from the test code that you insert in frontend/src/app/App.js: ![image](/attachments/75e7e3ce-b6b8-4fdc-81ad-b5930d022480)
Author
Collaborator

@b24hugst
can you double check the request because the result you should get looks like this.

@b24hugst can you double check the request because the result you should get looks like this.
Collaborator

@a24sakma I redid everything but still get the same "null" result. Maybe someone else could just test the branch as well and if that person also gets your correct result we know it's probably just me 😂

@a24sakma I redid everything but still get the same "null" result. Maybe someone else could just test the branch as well and if that person also gets your correct result we know it's probably just me 😂
Author
Collaborator

@b24hugst Otherwise I can check while you build it because it should work on your pc.

@b24hugst Otherwise I can check while you build it because it should work on your pc.
Collaborator

After some communication help from @a24sakma, it now works as it should.

The problem was that I had some underlying cache of docker images or something that disrupted the results. After using docker system prune -a and then manually creating each docker file again, it worked correctly:

image

After some communication help from @a24sakma, it now works as it should. The problem was that I had some underlying cache of docker images or something that disrupted the results. After using **docker system prune -a** and then manually creating each docker file again, it worked correctly: ![image](/attachments/21200eb5-0824-4254-bc17-735feed8c372)
Collaborator

a24timsv has been assigned to make an additional review since the developer had configuration problems with docker.

a24timsv has been assigned to make an additional review since the developer had configuration problems with docker.
Collaborator

I can confirm that it works, it just took some time due to other issues.

Since the parking mockup doesn't use any databases or similar it is assumed to be an external service (like TimeEdit) that is called upon rather than a local one (like the temp sensor). We could open an issue about designing how the data is shown once this gets pushed.

However, when making branches it should not be required to configure and build stuff manually to test a solution. As an example, this branch needs to manually build the image for the mockup data and add lines to App.js to showcase that it works. All branches should be runnable by pulling the branch and using the build scripts. We will get more errors by people manually configuring than not doing so. It is not needed now since we know that it works, but maybe this should be made aware to everyone.

I can confirm that it works, it just took some time due to other issues. Since the parking mockup doesn't use any databases or similar it is assumed to be an external service (like TimeEdit) that is called upon rather than a local one (like the temp sensor). We could open an issue about designing how the data is shown once this gets pushed. However, when making branches it should not be required to configure and build stuff manually to test a solution. As an example, this branch needs to manually build the image for the mockup data and add lines to App.js to showcase that it works. All branches should be runnable by pulling the branch and using the build scripts. We will get more errors by people manually configuring than not doing so. It is not needed now since we know that it works, but maybe this should be made aware to everyone.
Author
Collaborator

@a24timsv
Nice that it works.

  • I agree about the build process.
  • This I don't think I have the build script in my local machine at the moment

I have the build script in my local machine. I just did not see it :). I will add it to the next pr that I am already working as part of the below changes

  • About the database we had a meeting this morning with the other developers and we agreed to use database even for this micro service. This change will be added as separate pr. The endpoints function the same so it should not be so much difference from how it works now.
@a24timsv Nice that it works. - I agree about the build process. - ~~This I don't think I have the build script in my local machine at the moment~~ I have the build script in my local machine. I just did not see it :). I will add it to the next pr that I am already working as part of the below changes - About the database we had a meeting this morning with the other developers and we agreed to use database even for this micro service. This change will be added as separate pr. The endpoints function the same so it should not be so much difference from how it works now.
Collaborator

Added code to App.js and the build scripts to get it to work right after just running the build script.

Added code to App.js and the build scripts to get it to work right after just running the build script.
Collaborator

This was manually merged. The review seems complete so i will close this pull request.

This was manually merged. The review seems complete so i will close this pull request.
b24johka closed this pull request 2026-04-13 10:11:18 +00:00
b24johka deleted branch feature/#127-parking-api-mockup 2026-04-13 10:11:22 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!174
No description provided.