Skip to content
Snippets Groups Projects

Feature/connect bio entity endpoint

Merged Tadeusz Miesiąc requested to merge feature/connect-bio-entity-endpoint into development
3 unresolved threads

Describe

In this PR I connected new api endpoint related to bioEntity search

Things done

  • switched to new BASE url that provides new endpoint
  • added new axios instance for experimental API

Things to consider in the future

Validation of incoming data might be difficult to do in runtime. We should add sentry/bugsnag to the app

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
29 width: z.number(),
30 height: z.number(),
31 visibilityLevel: z.string(),
32 transparencyLevel: z.string(),
33 synonyms: z.array(z.string()),
34 formerSymbols: z.array(z.string()),
35 fullName: z.string(),
36 abbreviation: z.union([z.string(), z.null()]),
37 formula: z.union([z.string(), z.null()]),
38 glyph: z.union([glyphSchema, z.null()]),
39 activity: z.boolean(),
40 structuralState: z.union([structuralStateSchema, z.null()]),
41 hypothetical: z.union([z.boolean(), z.null()]),
42 boundaryCondition: z.boolean(),
43 constant: z.boolean(),
44 initialAmount: z.union([z.number(), z.null()]),
  • 1 1 // eslint-disable-next-line import/no-extraneous-dependencies
    2 2 import MockAdapter from 'axios-mock-adapter';
    3 import { axiosInstance } from '@/services/api/utils/axiosInstance';
    3 import { axiosInstance, axiosInstanceExperimentalAPI } from '@/services/api/utils/axiosInstance';
    4 4
    5 5 export const mockNetworkResponse = (): MockAdapter => {
    6 6 const mock = new MockAdapter(axiosInstance);
    7 7 return mock;
    8 8 };
    9
    10 export const mockNetworkExperimentalAPIResponse = (): MockAdapter => {
  • 1 import { BASE_API_URL } from '@/constants';
    1 import { BASE_API_URL, BASE_NEW_API_URL } from '@/constants';
    2 2 import axios from 'axios';
    3 3
    4 4 export const axiosInstance = axios.create({
    5 5 baseURL: BASE_API_URL,
    6 6 });
    7
    8 export const axiosInstanceExperimentalAPI = axios.create({
    9 baseURL: BASE_NEW_API_URL,
  • LGTM

    The only issue I see here is our structure of files inside models dir, it's uncontrollably getting bigger and bigger. IMO we should discuss idea of placing these models in group folders

  • Adrian Orłów approved this merge request

    approved this merge request

  • Tadeusz Miesiąc added 2 commits

    added 2 commits

    • f6dc40f2 - refactor(models): changed union with null to nullable to follow zod guidlines
    • b9f7167d - feat(models): fixes from pr

    Compare with previous version

  • Tadeusz Miesiąc enabled an automatic merge when the pipeline for b9f7167d succeeds

    enabled an automatic merge when the pipeline for b9f7167d succeeds

  • Tadeusz Miesiąc mentioned in commit 904aa9c3

    mentioned in commit 904aa9c3

  • Please register or sign in to reply
    Loading