Skip to content
Snippets Groups Projects
Commit 910a7266 authored by Tadeusz Miesiąc's avatar Tadeusz Miesiąc
Browse files

refactor(reference schema): extracted article to separate schema

parent f8a69f07
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!20Resolve MIN-57 "Feature/ connect drug search query"
import { z } from 'zod';
export const articleSchema = z.object({
title: z.string(),
authors: z.array(z.string()),
journal: z.string(),
year: z.number(),
link: z.string(),
pubmedId: z.string(),
citationCount: z.number(),
});
import { z } from 'zod';
import { articleSchema } from './articleSchema';
export const referenceSchema = z.object({
link: z.string(),
article: z
.object({
title: z.string(),
authors: z.array(z.string()),
journal: z.string(),
year: z.number(),
link: z.string(),
pubmedId: z.string(),
citationCount: z.number(),
})
.optional(),
article: articleSchema.optional(),
type: z.string(),
resource: z.string(),
id: z.number(),
......
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