Skip to content

Goose Form BE è la componente di backend sviluppata in Spring Boot che si occupa di gestire le informazioni recuperate da Goose Form Manager, salvarle su un database relazionale e generare l'oggetto JSON compatibile con il motore di Goose Form.

License

RiccardoRiggi/gooseform-be

Repository files navigation

Goose Form BE

"Alla Goose più coraggiosa che io conosca"

Goose Form BE è la componente di backend sviluppata in Spring Boot che si occupa di gestire le informazioni recuperate da Goose Form Manager, salvarle su un database relazionale e generare l'oggetto JSON compatibile con il motore di Goose Form. Di seguito la documentazione che illustra la struttura del database e il funzionamento delle API Rest. L'applicazione necessità di un server Tomcat correttamente configurato con un database relazione MySQL. All'interno di questo repository sono presenti tutti gli script SQL e le insert per popolare le tavole di configurazione. Si rimanda comunque alla documentazione del motore di Goose Form e alla guida all'utilizzo di Goose Form Manager


Database

GOOSE_BUTTON

Nome Tipo
formId varchar
type varchar
title varchar
icon varchar

GOOSE_COMPONENT

Nome Tipo
formId varchar
id varchar
type varchar
label varchar
widthXl varchar
widthLg varchar
widthMd varchar
widthSm varchar
width varchar
requiredMark tinyint

GOOSE_COMPONENT_SPECIFIC

Nome Tipo
formId varchar
id varchar
nomeAttributo varchar
valoreAttributo varchar

GOOSE_CONTROL

Nome Tipo
pk int
formId varchar
type varchar
typeSpecific varchar
idComponentA varchar
idComponentB varchar
idComponentC varchar
referenceValue varchar
errorMessage varchar

GOOSE_FORM

Nome Tipo
formId varchar
description varchar
title varchar
icon varchar

GOOSE_HTTP_REQUEST

Nome Tipo
pk int
formId varchar
componentId varchar
url varchar
method varchar
body varchar
typeSpecific varchar

GOOSE_KV_COMPONENT

Nome Tipo
formId varchar
componentId varchar
k varchar
v varchar

GOOSE_KV_COMPONENT

Nome Tipo
pkHttp int
k varchar
v varchar

GOOSE_K_CONTROL

Nome Tipo
pkControl int
k varchar

GOOSE_POPUP

Nome Tipo
pk int
formId varchar
componentId varchar
icon varchar
textTooltip varchar
title varchar
description varchar

GOOSE_RENDER

Nome Tipo
pk int
formId varchar
type varchar
typeSpecific varchar
idComponentA varchar
idComponentB varchar
idComponentC varchar
value varchar

GOOSE_TOOLTIP

Nome Tipo
pk int
formId varchar
componentId varchar
icon varchar
tooltip varchar

T_COMPONENT_SPECIFIC

Nome Tipo
type varchar
k varchar
v varchar

T_CONTROL

Nome Tipo
type varchar
k varchar
description varchar

T_PLACEHOLDER

Nome Tipo
type varchar
placeholder varchar

T_RENDER

Nome Tipo
type varchar
k varchar
description varchar

Endpoint

Anteprima

Endpoint: http://localhost:8080/gooseform/manager/anteprima/{formId}
Method: GET
Body: nessuno
Response:

{ 	
    "formId": "anagraficaForm", 	
    "title": "Inserimento di un'anagrafica",
	"icon": "fa-solid fa-hat-cowboy",
	"sendButton": { ...	},
	"resetButton": {...},
	"description": "Descrizione di un form",
	"popup": {...},
	"autocomplete": true,
	"destinationUrl": {...},
	"originUrl": null,
	"components": [],
	"controls": [],
	"renders": []
} 

Goose Form

Endpoint: http://localhost:8080/gooseform/manager/form/inserisci
Method: POST
Body:

{
  "formId": "formId",
  "title": "Titolo",
  "icon": "icona",
  "description": "Descrizione"
} 

Response:


Endpoint: http://localhost:8080/gooseform/manager/form/{formId}
Method: GET
Body:

Response:

{
	"formId": "formId",
	"title": "Titolo",
	"icon": "fa-solid fa-hat-cowboy",
	"description": "Descrizione"
}

Endpoint: http://localhost:8080/gooseform/manager/form/
Method: GET
Body:

Response:

[
    {
        "formId": "formId",
        "title": "Titolo",
        "icon": "fa-solid fa-hat-cowboy",
        "description": "Descrizione"
    }
]

Endpoint: http://localhost:8080/gooseform/manager/form/modifica/{formId}
Method: PUT
Body:

{
	"title": "Titolo",
	"icon": "icona",
	"description": "Descrizioneeeeeee"
} 

Response:


Endpoint: http://localhost:8080/gooseform/manager/form/elimina/{formId}
Method: DELETE
Body:

Response:

Goose Http Request

Endpoint: http://localhost:8080/gooseform/manager/http/inserisci
Method: POST
Body:

{
	"formId": "formId",
	"componentId": "componentId",
	"url": "url",
	"method": "method",
	"body": "body",
	"typeSpecific": "SUBMIT"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/http/pk/{pk}
Method: GET
Body:

Response:

{
	"pk": 31,
	"formId": "formId",
	"componentId": null,
	"url": "https://www.riccardoriggi.it",
	"method": "GET",
	"body": "",
	"typeSpecific": "SUBMIT"
}

Endpoint: http://localhost:8080/gooseform/manager/http/form/{type}/{formId}
Method: GET
Body:

Response:

{
	"pk": 31,
	"formId": "formId",
	"componentId": null,
	"url": "https://www.riccardoriggi.it",
	"method": "GET",
	"body": "",
	"typeSpecific": "SUBMIT"
}

Endpoint: http://localhost:8080/gooseform/manager/http/form/{formId}/{componentId}
Method: GET
Body:

Response:

{
	"pk": 31,
	"formId": "formId",
	"componentId": null,
	"url": "https://www.riccardoriggi.it",
	"method": "GET",
	"body": "",
	"typeSpecific": "SUBMIT"
}

Endpoint: http://localhost:8080/gooseform/manager/http/modifica/{pk}
Method: PUT
Body:

{
	"url": "https://www.riccardoriggi.it",
	"method": "GET",
	"body": "",
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/http/elimina/{pk}
Method: DELETE
Body:

Response:

Goose KV Http Request

Endpoint: http://localhost:8080/gooseform/manager/kv-http/inserisci
Method: POST
Body:

{
	"pkHttp":3,
	"k": "CHIAVE",
	"v": "VALORE"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/kv-http/{pk}
Method: GET
Body:

Response:

[
	{
		"pkHttp": 38,
		"k": "Bareer",
		"v": "123"
	}
]

Endpoint: http://localhost:8080/gooseform/manager/kv-http/{pk}/{k}
Method: DELETE
Body:

Response:


Goose Button

Endpoint: http://localhost:8080/gooseform/manager/button/inserisci
Method: POST
Body:

{
	"formId": "formId",
	"type": "SEND",
	"title": "RESET",
	"icon": "fa-solid fa-undo"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/button/{formId}/{type}
Method: GET
Body:

Response:

{
	"formId": "formId",
	"type": "SEND",
	"title": "RESET",
	"icon": "fa-solid fa-undo"
}

Endpoint: http://localhost:8080/gooseform/manager/button/modifica/{formId}/{type}
Method: PUT
Body:

{
	"title": "RESET",
	"icon": "fa-solid fa-undo"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/button/elimina/{formId}/{type}
Method: DELETE
Body:

Response:

Goose Popup

Endpoint: http://localhost:8080/gooseform/manager/popup/inserisci
Method: POST
Body:

{
	"formId": "formId",
	"componentId": "componentId",
	"icon": "icon",
	"textTooltip": "textTooltip",
	"title": "title",
	"description": "description"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/popup/{formId}/{componentId}
Method: GET
Body:

Response:

{
	"pk": 18,
	"formId": "formId",
	"componentId": "componentId",
	"icon": "icon",
	"textTooltip": "textTooltip",
	"title": "title",
	"description": "description"
}

Endpoint: http://localhost:8080/gooseform/manager/popup/{formId}
Method: GET
Body:

Response:

{
	"pk": 18,
	"formId": "formId",
	"componentId": "componentId",
	"icon": "icon",
	"textTooltip": "textTooltip",
	"title": "title",
	"description": "description"
}

Endpoint: http://localhost:8080/gooseform/manager/popup/modifica/{pk}
Method: PUT
Body:

{
	"icon": "icon",
	"textTooltip": "textTooltip",
	"title": "title",
	"description": "description"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/popup/elimina/{pk}
Method: DELETE
Body:

Response:

Goose Tooltip

Endpoint: http://localhost:8080/gooseform/manager/tooltip/inserisci
Method: POST
Body:

{
	"formId": "formId",
	"componentId": null,
	"icon": "icon",
	"tooltip": "tooltip"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/tooltip/{formId}/{componentId}
Method: GET
Body:

Response:

{
	"pk": 1,
	"formId": "formId",
	"componentId": "componentId",
	"icon": "icon",
	"tooltip": "tooltip"
}

Endpoint: http://localhost:8080/gooseform/manager/tooltip/{formId}
Method: GET
Body:

Response:

{
	"pk": 1,
	"formId": "formId",
	"componentId": "componentId",
	"icon": "icon",
	"tooltip": "tooltip"
}

Endpoint: http://localhost:8080/gooseform/manager/tooltip/modifica/{pk}
Method: PUT
Body:

{
	"icon": "icon",
	"tooltip": "textTooltip",
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/tooltip/elimina/{pk}
Method: DELETE
Body:

Response:

Goose Component

Endpoint: http://localhost:8080/gooseform/manager/component/inserisci
Method: POST
Body:

{
    "formId": "formId",
    "id": "componentId",
    "type": "GOOSE_TEXT_FIELD",
    "label": "Esempio Text Field - gooseTextField",
    "widthXl": "12",
    "widthLg": "12",
    "widthMd": "12",
    "widthSm": "12",
    "width": "12",
    "requiredMark": true
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/component/{formId}/{componentId}
Method: GET
Body:

Response:

{
	"formId": "formId",
	"id": "componentId",
	"type": "GOOSE_TEXT_FIELD",
	"label": "Esempio Text Field - gooseTextField",
	"widthXl": "12",
	"widthLg": "12",
	"widthMd": "12",
	"widthSm": "12",
	"width": "12",
	"requiredMark": true
}

Endpoint: http://localhost:8080/gooseform/manager/component/{formId}
Method: GET
Body:

Response:

[
    {
        "formId": "formId",
        "id": "componentId",
        "type": "GOOSE_TEXT_FIELD",
        "label": "Esempio Text Field - gooseTextField",
        "widthXl": "12",
        "widthLg": "12",
        "widthMd": "12",
        "widthSm": "12",
        "width": "12",
        "requiredMark": true
    }
]

Endpoint: http://localhost:8080/gooseform/manager/component/modifica/{formId}/{componentId}
Method: PUT
Body:

{
	"label": "Esempio Text Field - gooseTextField",
	"widthXl": "12",
	"widthLg": "12",
	"widthMd": "12",
	"widthSm": "12",
	"width": "12",
	"requiredMark": true
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/component/elimina/{formId}/{componentId}
Method: DELETE
Body:

Response:

Goose Component Specific

Endpoint: http://localhost:8080/gooseform/manager/component-specific/inserisci
Method: POST
Body:

{
	"formId": "formId",
	"id": "selectId",
	"nomeAttributo": "size",
	"valoreAttributo": "1"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/component-specific/{formId}/{componentId}/{k}
Method: GET
Body:

Response:

{
	"formId": "idForm",
	"id": "gooseTextField",
	"nomeAttributo": "required",
	"valoreAttributo": "true"
}

Endpoint: http://localhost:8080/gooseform/manager/component-specific/{formId}/{componentId}
Method: GET
Body:

Response:

[
    {
        "formId": "idForm",
        "id": "gooseTextField",
        "nomeAttributo": "required",
        "valoreAttributo": "true"
    }
]

Endpoint: http://localhost:8080/gooseform/manager/component-specific/elimina/{formId}/{componentId}/{k}
Method: DELETE
Body:

Response:


Goose KV Component

Endpoint: http://localhost:8080/gooseform/manager/kv-component/inserisci
Method: POST
Body:

{
	"formId": "formId",
	"componentId": "gooseSelect",
	"k": "GE",
	"v": "GENOVA"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/kv-component/{formId}/{componentId}
Method: GET
Body:

Response:

[
	{
        "formId": "formId",
        "componentId": "gooseSelect",
        "k": "GE",
        "v": "GENOVA"
    }
]

Endpoint: http://localhost:8080/gooseform/manager/kv-component/{pk}/{k}
Method: DELETE
Body:

Response:


Goose Control

Endpoint: http://localhost:8080/gooseform/manager/control/inserisci
Method: POST
Body:

{
	"formId": "formId",
	"type": "STANDARD",
	"typeSpecific": "REQUIRED",
	"idComponentA": "componentId",
	"referenceValue": "",
	"errorMessage": "Messaggio di errore"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/control/{pk}
Method: GET
Body:

Response:

{
    "pk": 2,
	"formId": "formId",
	"type": "STANDARD",
	"typeSpecific": "REQUIRED",
	"idComponentA": "componentId",
	"idComponentB": "",
	"idComponentC": "",
	"referenceValue": "",
	"errorMessage": "Il campo è richiesto"
}

Endpoint: http://localhost:8080/gooseform/manager/control/lista/{formId}
Method: GET
Body:

Response:

[
    {
        "pk": 2,
        "formId": "formId",
        "type": "STANDARD",
        "typeSpecific": "REQUIRED",
        "idComponentA": "componentId",
        "idComponentB": "",
        "idComponentC": "",
        "referenceValue": "",
        "errorMessage": "Il campo è richiesto"
    }
]

Endpoint: http://localhost:8080/gooseform/manager/control/modifica/{pk}
Method: PUT
Body:

{
    "formId": "formId",
    "type": "STANDARD",
    "typeSpecific": "REQUIRED",
    "idComponentA": "componentId",
    "idComponentB": "",
    "idComponentC": "",
    "referenceValue": "",
    "errorMessage": "Il campo è richiesto"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/control/elimina/{pk}
Method: DELETE
Body:

Response:


Goose K Control

Endpoint: http://localhost:8080/gooseform/manager/k-control/inserisci
Method: POST
Body:

{
	"pkHttp":3,
	"k": "CHIAVE",
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/k-control/{pk}
Method: GET
Body:

Response:

[
	{
		"pkHttp": 3,
		"k": "CHIAVE",
	}
]

Endpoint: http://localhost:8080/gooseform/manager/k-control/{pk}/{k}
Method: DELETE
Body:

Response:


Goose Render

Endpoint: http://localhost:8080/gooseform/manager/render/inserisci
Method: POST
Body:

{
	"formId": "formId",
	"type": "SIMPLE_RENDER",
	"typeSpecific": "HIDE_B_IF_A_MIN_X",
	"idComponentA": "componentId",
	"idComponentB": "componentId",
	"idComponentC": "",
	"value": "12"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/render/{pk}
Method: GET
Body:

Response:

{
    "pk":1
	"formId": "formId",
	"type": "SIMPLE_RENDER",
	"typeSpecific": "HIDE_B_IF_A_MIN_X",
	"idComponentA": "componentId",
	"idComponentB": "componentId",
	"idComponentC": "",
	"value": "12"
}

Endpoint: http://localhost:8080/gooseform/manager/render/lista/{formId}
Method: GET
Body:

Response:

[
    {
        "pk":1
        "formId": "formId",
        "type": "SIMPLE_RENDER",
        "typeSpecific": "HIDE_B_IF_A_MIN_X",
        "idComponentA": "componentId",
        "idComponentB": "componentId",
        "idComponentC": "",
        "value": "12"
    }
]

Endpoint: http://localhost:8080/gooseform/manager/render/modifica/{pk}
Method: PUT
Body:

{
    "formId": "formId",
    "type": "SIMPLE_RENDER",
    "typeSpecific": "HIDE_B_IF_A_MIN_X",
    "idComponentA": "componentId",
    "idComponentB": "componentId",
    "idComponentC": "",
    "value": "12"
}

Response:


Endpoint: http://localhost:8080/gooseform/manager/render/elimina/{pk}
Method: DELETE
Body:

Response:


Goose Utils

Endpoint: http://localhost:8080/gooseform/manager/validation/componente/{type}
Method: GET
Body:

Response:

[
	{
		"type": "GOOSE_SELECT",
		"k": "valueName",
		"v": "String"
	}
]

Endpoint: http://localhost:8080/gooseform/manager/validation/componente/{type}/{k}
Method: GET
Body:

Response:

{
	"type": "GOOSE_SELECT",
	"k": "valueName",
	"v": "String"
}

Endpoint: http://localhost:8080/gooseform/manager/validation/control/{type}
Method: GET
Body:

Response:

[
	{
		"type": "STANDARD",
		"k": "EQUAL",
		"description": "Verifica che il campo sia uguale ad un determinato valore"
	}
]

Endpoint: http://localhost:8080/gooseform/manager/validation/control/{type}/{k}
Method: GET
Body:

Response:

{
	"type": "STANDARD",
	"k": "EQUAL",
	"description": "Verifica che il campo sia uguale ad un determinato valore"
}

Endpoint: http://localhost:8080/gooseform/manager/validation/render/{type}
Method: GET
Body:

Response:

[
	{
		"type": "SIMPLE_RENDER",
		"k": "DISABLED_B_IF_A_EQUAL_X",
		"description": "Disabilita B se A è uguale ad un determinato valore"
	}
]

Endpoint: http://localhost:8080/gooseform/manager/validation/render/{type}/{k}
Method: GET
Body:

Response:

{
	"type": "SIMPLE_RENDER",
	"k": "DISABLED_B_IF_A_EQUAL_X",
	"description": "Disabilita B se A è uguale ad un determinato valore"
}

Endpoint: http://localhost:8080/gooseform/manager/validation/placeholder/{type}
Method: GET
Body:

Response:

{
	"key": "GOOSE_DATE_TIME_FIELD",
	"value": "YYYY-MM-DDTHH:MM"
}

Bom / Diba

Spring Boot

MyBatis

Lombok

TomCat

MySQL


Licenza

Il codice sorgente da me scritto viene rilasciato con licenza MIT, framework, temi e librerie di terze parti mantengono le loro relative licenze.

About

Goose Form BE è la componente di backend sviluppata in Spring Boot che si occupa di gestire le informazioni recuperate da Goose Form Manager, salvarle su un database relazionale e generare l'oggetto JSON compatibile con il motore di Goose Form.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages