### File

`src/core/domain/dtos/paper.dto.ts`

### Description

Structure of the document stored and retrieved from Elasticsearch

### Index

###### Properties

- authors
- content
- id
- summary
- tags
- title
- topic

### Properties

authors
Type : `string[]`
Decorators : `@IsNotEmpty() @IsArray() @ApiProperty({description: 'List of authors of the paper', example: undefined})`
Defined in src/core/domain/dtos/paper.dto.ts:45
List of authors of the paper

content
Type : `string`
Decorators : `@ApiProperty({description: 'Contents of the paper presented in Markdown (.md) format', example: '...'})`
Defined in src/core/domain/dtos/paper.dto.ts:87
Contents of the paper [Markdown]

id
Type : `string`
Decorators : `@IsNotEmpty() @IsString() @ApiProperty({description: 'Unique ID of the paper', example: 'cc3c3cca-f763-495c-8dfa-69c45ca738ff'})`
Defined in src/core/domain/dtos/paper.dto.ts:23
Unique ID of the paper

summary
Type : `string`
Decorators : `@IsNotEmpty() @IsString() @ApiProperty({description: 'Summary of the paper. May be a short excerpt from the main text', example: 'S-algol (St Andrews Algol):vii is a computer programming language derivative of ALGOL 60 developed at the University of St Andrews in 1979 by Ron Morrison and Tony Davie'})`
Defined in src/core/domain/dtos/paper.dto.ts:67
Summary of the paper. May be a short excerpt from the main text.

tags
Type : `string[]`
Decorators : `@IsNotEmpty() @IsArray() @ApiProperty({description: 'List of tags, that show the certain topics/fields of knowledge paper is touching', example: undefined})`
Defined in src/core/domain/dtos/paper.dto.ts:78
List of tags, that show the certain topics/fields of knowledge paper is touching

title
Type : `string`
Decorators : `@IsNotEmpty() @IsString() @ApiProperty({description: 'Title of the paper', example: 'Mucosal associated invariant T cell'})`
Defined in src/core/domain/dtos/paper.dto.ts:34
Title of the paper

topic
Type : `string`
Decorators : `@IsNotEmpty() @IsString() @ApiProperty({description: 'Topic of the paper', example: 'Physics'})`
Defined in src/core/domain/dtos/paper.dto.ts:56
Topic of the paper

    import { ApiExtraModels, ApiProperty } from "@nestjs/swagger";
    import { IsArray, IsDefined, IsIn, IsInt, IsNotEmpty, IsOptional, IsString } from "class-validator";

    /**
     * List of allowed properties in this DTO
     */
    const allowedProperties = ['id', 'title', 'authors', 'topic', 'summary', 'tags', 'content'];

    /**
     * Structure of the document stored and retrieved from Elasticsearch
     */
    @ApiExtraModels()
    export class PaperDto {
        /**
         * Unique ID of the paper
         */
        @IsNotEmpty()
        @IsString()
        @ApiProperty({
            description: 'Unique ID of the paper',
            example: 'cc3c3cca-f763-495c-8dfa-69c45ca738ff'
        })
        id: string;

        /**
         * Title of the paper
         */
        @IsNotEmpty()
        @IsString()
        @ApiProperty({
            description: 'Title of the paper',
            example: 'Mucosal associated invariant T cell',
        })
        title: string;

        /**
         * List of authors of the paper
         */
        @IsNotEmpty()
        @IsArray()
        @ApiProperty({
            description: 'List of authors of the paper',
            example: ['Daniil Mikhaylov', 'Denis Gorbunov', 'Maxim Ten']
        })
        authors: string[];

        /**
         * Topic of the paper
         */
        @IsNotEmpty()
        @IsString()
        @ApiProperty({
            description: 'Topic of the paper',
            example: 'Physics'
        })
        topic: string;

        /**
         * Summary of the paper. May be a short excerpt from the main text.
         */
        @IsNotEmpty()
        @IsString()
        @ApiProperty({
            description: 'Summary of the paper. May be a short excerpt from the main text',
            example: 'S-algol (St Andrews Algol):vii is a computer programming language derivative of ALGOL 60 developed at the University of St Andrews in 1979 by Ron Morrison and Tony Davie'
        })
        summary: string;

        /**
         * List of tags, that show the certain topics/fields of knowledge paper is touching
         */
        @IsNotEmpty()
        @IsArray()
        @ApiProperty({
            description: 'List of tags, that show the certain topics/fields of knowledge paper is touching',
            example: ['Neurobiology', 'Neuron structure', 'Neuroimaging']
        })
        tags: string[];

        /**
         * Contents of the paper [Markdown]
         */
        @ApiProperty({
            description: 'Contents of the paper presented in Markdown (.md) format',
            example: '...'
        })
        content: string;
    }

# results matching ""

# No results matching ""