Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Example: Adding fields to the component schema, as well as the api. What classes to change:
    1. Rest API:
      1. controller/ComponentController.java → @RestController() 
        1. This is where you define the api commands
          1. @PostMapping, @GetMapping, @DeleteMapping
      2. mapper/ComponentMapper.java → @Mapper
        1. This is only made when you have a field that has fields of its own, and you need to map it to main schema
    2. Service:
      1. This is the backend logic that the rest api commands call
      2. service/ComponentService.java → @Service()
        1. ex: create() - check no conflict, check dependencies, then create the component and save to mongodb, then return the created component id back to user
    3. Repository:
      1. This is backend logic that extends MongoRepository for functions regarding the repository like 'boolean existsByName(string name)"
        1. repository/ComponentRepository.java
    4. Schema:
      1. model/Component.java
      2. dto/ComponentDTO.java → @Schema()
        1. This is where you define the db document schema
      3. dto/newComponentDTO.java →@Schema()
        1. What's the difference between componentDTO and newComponentDTO?
    5. Exception Handling:
      1. exception/ComponentAlreadyExists → @ResponseStatus
      2. exception/ComponentNotFound→ @ResponseStatus
    6. Testing:
      1. test/....../controller/ComponentControllerTest.java
      2. test/....../service/ComponentServiceTest.java

Proof of concept development

Used configMap to pass in information from backend to build container. So build container can echo the build parameters passed in

  • Commands:
    • kubectl create configmap build-config --from-file=build-request.
      properties
    • kubectl describe configmaps build-config