FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Spring-Framework-API-REST/config/SwaggerConfig.java at main · lramon2001/Spring-Framework-API-REST · GitHub
lramon2001
/
Spring-Framework-API-REST
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Spring-Framework-API-REST
/
config
/
SwaggerConfig.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (36 loc) · 1.61 KB
Breadcrumbs
Spring-Framework-API-REST
/
config
/
SwaggerConfig.java
Copy path
File metadata and controls
44 lines (36 loc) · 1.61 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package
br
.
com
.
lucasramon
.
lrprojetos
.
config
;
import
org
.
springframework
.
context
.
annotation
.
Configuration
;
import
springfox
.
documentation
.
builders
.
ApiInfoBuilder
;
import
springfox
.
documentation
.
builders
.
PathSelectors
;
import
springfox
.
documentation
.
builders
.
RequestHandlerSelectors
;
import
springfox
.
documentation
.
service
.
ApiInfo
;
import
springfox
.
documentation
.
service
.
Contact
;
import
springfox
.
documentation
.
spi
.
DocumentationType
;
import
springfox
.
documentation
.
spring
.
web
.
plugins
.
Docket
;
import
springfox
.
documentation
.
swagger2
.
annotations
.
EnableSwagger2
;
@
Configuration
@
EnableSwagger2
public
class
SwaggerConfig
{
private
static
final
String
CONTATO_EMAIL
=
"lucasoliveirainor3105@gmail.com"
;
private
static
final
String
CONTATO_URL
=
"https://github.com/lramon2001"
;
private
static
final
String
CONTATO_NOME
=
"Lucas Ramon"
;
private
static
final
String
API_VERSAO
=
"1.0.0"
;
private
static
final
String
API_DESCRICAO
=
"API de Gerenciamento de Projetos"
;
private
static
final
String
API_TITULO
=
"LR projetos"
;
private
static
final
String
PACOTE_BASE
=
"br.com.lucasramon.lrprojetos.api"
;
public
Docket
getDocket
(){
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
PACOTE_BASE
))
.
paths
(
PathSelectors
.
any
())
.
build
().
apiInfo
(
buildApiInfo
());
}
private
ApiInfo
buildApiInfo
(){
return
new
ApiInfoBuilder
()
.
title
(
API_TITULO
)
.
description
(
API_DESCRICAO
)
.
version
(
API_VERSAO
)
.
contact
(
new
Contact
(
CONTATO_NOME
,
CONTATO_URL
,
CONTATO_EMAIL
))
.
build
();
}
}
Back
|
FazBrowse Home
|
New Git URL