Skip to content

Commit

Permalink
Mbc 36 fix swagger and projector (#20)
Browse files Browse the repository at this point in the history
* refactor: no hardcode URL swagger and frontend oauth2 PKCE

* refactor: more readable permissions and roles and remove redundancy

* refactor: permissionService to hasAuthority

* refactor: remove redundant property projections
fix: solve N+1 Bill Service
fix: remove profile docs generated by spring data rest
feat: handle forbidden RBAC+ACL

* feat: add full permission

* fix: read data bills

* refactor: remove unused adoc

* refactor: set base projection dto, set id for permission validating
fix: bill update status permission

* fix: readonly entity id

* refactor: rename IT and add baseUnitTest

* refactor: fix duplicate data

* refactor: improve code organization gmail, register and user service
  • Loading branch information
1119-DuyNguyen authored Jun 30, 2024
1 parent c9fd1b9 commit ccd59c8
Show file tree
Hide file tree
Showing 72 changed files with 737 additions and 802 deletions.
53 changes: 47 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,6 @@
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>1.30.1</version>
</dependency>


<!-- <dependency>-->
<!-- <groupId>me.paulschwarz</groupId>-->
Expand All @@ -210,7 +204,54 @@
<build>
<plugins>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<includes>
<include>**/*Service.*</include>
<include>**/*Controller.*</include>
<include>**/*Projection.*</include>

</includes>
</configuration>
</execution>

<!-- <execution>-->
<!-- <id>jacoco-check</id>-->
<!-- <goals>-->
<!-- <goal>check</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <rules>-->
<!-- <rule>-->
<!-- <element>PACKAGE</element>-->
<!-- <limits>-->
<!-- <limit>-->
<!-- <counter>LINE</counter>-->
<!-- <value>COVEREDRATIO</value>-->
<!-- <minimum>0.9</minimum>-->
<!-- </limit>-->
<!-- </limits>-->
<!-- </rule>-->
<!-- </rules>-->
<!-- </configuration>-->
<!-- </execution>-->
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down
127 changes: 110 additions & 17 deletions src/docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,113 @@ The index provides the entry point into the service.

A `GET` request is used to access the index

==== Request structure

include::{snippets}/index-example/http-request.adoc[]

==== Example response

include::{snippets}/index-example/http-response.adoc[]

==== CURL request

include::{snippets}/index-example/curl-request.adoc[]

[[resources-index-links]]
==== Links

include::{snippets}/index-example/links.adoc[]

// ==== Request structure
//
// include::{snippets}/index-example/http-request.adoc[]
//
// ==== Example response
//
// include::{snippets}/index-example/http-response.adoc[]
//
// ==== CURL request
//
// include::{snippets}/index-example/curl-request.adoc[]
//
// [[resources-index-links]]
// ==== Links
//
// include::{snippets}/index-example/links.adoc[]
//
// [[resources-CRUD]]
// == CRUD REST Service
//
// The CRUD provides the entry point into the service.
//
// [[resources-crud-get]]
// === Accessing the crud GET
//
// A `GET` request is used to access the CRUD read.
//
// ==== Request structure
//
// include::{snippets}/crud-get-example/http-request.adoc[]
//
// ==== Example response
//
// include::{snippets}/crud-get-example/http-response.adoc[]
//
// ==== CURL request
//
// include::{snippets}/crud-get-example/curl-request.adoc[]
//
// [[resources-crud-post]]
// === Accessing the crud POST
//
// A `POST` request is used to access the CRUD create.
//
// ==== Request structure
//
// include::{snippets}/crud-create-example/http-request.adoc[]
//
// ==== Example response
//
// include::{snippets}/crud-create-example/http-response.adoc[]
//
// ==== CURL request
//
// include::{snippets}/crud-create-example/curl-request.adoc[]
//
// [[resources-crud-delete]]
// === Accessing the crud DELETE
//
// A `DELETE` request is used to access the CRUD delete.
//
// ==== Request structure
//
// include::{snippets}/crud-delete-example/http-request.adoc[]
//
// ==== Path Parameters
//
// include::{snippets}/crud-delete-example/path-parameters.adoc[]
//
// ==== Example response
//
// include::{snippets}/crud-delete-example/http-response.adoc[]
//
// ==== CURL request
//
// include::{snippets}/crud-delete-example/curl-request.adoc[]
//
// [[resources-crud-patch]]
// === Accessing the crud PATCH
//
// A `PATCH` request is used to access the CRUD update.
//
// ==== Request structure
//
// include::{snippets}/crud-patch-example/http-request.adoc[]
//
// ==== Example response
//
// include::{snippets}/crud-patch-example/http-response.adoc[]
//
// ==== CURL request
//
// include::{snippets}/crud-patch-example/curl-request.adoc[]
//
// [[resources-crud-put]]
// === Accessing the crud PUT
//
// A `PUT` request is used to access the CRUD update.
//
// ==== Request structure
//
// include::{snippets}/crud-put-example/http-request.adoc[]
//
// ==== Example response
//
// include::{snippets}/crud-put-example/http-response.adoc[]
//
// ==== CURL request
//
// include::{snippets}/crud-put-example/curl-request.adoc[]
188 changes: 0 additions & 188 deletions src/main/asciidoc/index.adoc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jakarta.validation.constraints.*;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;
import org.springframework.data.rest.core.annotation.RestResource;

import java.time.LocalDateTime;
import java.util.Date;
Expand Down
Loading

0 comments on commit ccd59c8

Please sign in to comment.