Skip to content
Snippets Groups Projects
Commit 96b6af38 authored by evilimkova's avatar evilimkova
Browse files

Adding Schema example for swagger

parent daaebee4
No related branches found
No related tags found
1 merge request!36M2 fix certificate
package org.fuseri.model.dto.certificate; package org.fuseri.model.dto.certificate;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.Getter; import lombok.Getter;
...@@ -12,6 +13,36 @@ import org.fuseri.model.dto.user.UserDto; ...@@ -12,6 +13,36 @@ import org.fuseri.model.dto.user.UserDto;
* This class represents a Data Transfer Object (DTO) for creating Certificate entities. * This class represents a Data Transfer Object (DTO) for creating Certificate entities.
* It is used for creating Certificate entity. * It is used for creating Certificate entity.
*/ */
@Schema(example = """
{
"user": {
"id": 1,
"username": "adelkaxxx",
"email": "adelkaxxx@muni.mail.cz",
"firstName": "Adéla",
"lastName": "Pulcová",
"address": {
"country": "Czechia",
"city": "Praha",
"street": "Bubenské nábřeží",
"houseNumber": "306/13",
"zip": "170 00"
},
"userType": "STUDENT",
"languageProficiency": {
"CZECH": "A2"
}
},
"course": {
"id": 1,
"name": "english a1",
"capacity": 10,
"language": "ENGLISH",
"proficiency": "A1"
}
}
""")
@Getter @Getter
@Setter @Setter
public class CertificateCreateDto { public class CertificateCreateDto {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment