question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Expected an assignment or function call and instead saw an expression" on code generation

See original GitHub issue

After running generate command on schema provided below - generated Typescript is wrong. Not sure where problem lies, backend is done using Django Rest Framework and schema is generated using built-in.

Failed to compile.

./src/fetchers.tsx
  Line 237:2:  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  Line 281:2:  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  Line 437:2:  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  Line 806:2:  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions

Search for the keywords to learn more about each error.

Example of that line:

export interface ListTagsResponse {
  id?: number;
  /**
   * Nazwa taga, np 'ścisłe'.
   */
  name: string;
}[]

When I change by hand to type and add equals sign before brackets it compiles well; that’s why I believe error lies on the side of react-restful.

Schema used for generation:

{
  "openapi": "3.0.2",
  "info": {
    "title": "random API",
    "version": "1.0.0"
  },
  "paths": {
    "/api/core/university/": {
      "get": {
        "operationId": "listUniversitys",
        "description": "",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "required": false,
            "in": "query",
            "description": "city",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "official_collaboration",
            "required": false,
            "in": "query",
            "description": "official_collaboration",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "name": {
                        "type": "string",
                        "description": "Pe\u0142na nazwa uczelni. Np.: 'Uniwersyste Warszawski'.",
                        "maxLength": 255
                      },
                      "acronym": {
                        "type": "string",
                        "nullable": true,
                        "description": "Skr\u00f3towiec nazwy uczleni je\u015bli istnieje. Np.: 'UW'.",
                        "maxLength": 255
                      },
                      "type": {
                        "enum": ["uniwersytet", "politechnika", "akademia"],
                        "description": "Rodzaj uczelni."
                      },
                      "city": {
                        "type": "string",
                        "description": "Miasto, w kt\u00f3rym jest g\u0142\u00f3wna siedziba uczelni.",
                        "maxLength": 255
                      },
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "G\u0142\u00f3wna strona internetowa uczelni.",
                        "maxLength": 1024
                      },
                      "official_collaboration": {
                        "type": "boolean",
                        "description": "Czy wsp\u00f3\u0142pracujemy z uczelni\u0105 oficjalnie."
                      },
                      "description": {
                        "type": "string",
                        "nullable": true,
                        "description": "Kr\u00f3tki opis uczelni."
                      },
                      "address": {
                        "type": "string",
                        "nullable": true,
                        "description": "G\u0142\u00f3wny adres uczelni.",
                        "maxLength": 255
                      }
                    },
                    "required": ["name", "type", "city", "url"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["University structure"]
      }
    },
    "/api/core/university/{id}/": {
      "get": {
        "operationId": "retrieveUniversity",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this Uczelnia.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "required": false,
            "in": "query",
            "description": "city",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "official_collaboration",
            "required": false,
            "in": "query",
            "description": "official_collaboration",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "name": {
                      "type": "string",
                      "description": "Pe\u0142na nazwa uczelni. Np.: 'Uniwersyste Warszawski'.",
                      "maxLength": 255
                    },
                    "acronym": {
                      "type": "string",
                      "nullable": true,
                      "description": "Skr\u00f3towiec nazwy uczleni je\u015bli istnieje. Np.: 'UW'.",
                      "maxLength": 255
                    },
                    "type": {
                      "enum": ["uniwersytet", "politechnika", "akademia"],
                      "description": "Rodzaj uczelni."
                    },
                    "city": {
                      "type": "string",
                      "description": "Miasto, w kt\u00f3rym jest g\u0142\u00f3wna siedziba uczelni.",
                      "maxLength": 255
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "G\u0142\u00f3wna strona internetowa uczelni.",
                      "maxLength": 1024
                    },
                    "official_collaboration": {
                      "type": "boolean",
                      "description": "Czy wsp\u00f3\u0142pracujemy z uczelni\u0105 oficjalnie."
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "description": "Kr\u00f3tki opis uczelni."
                    },
                    "address": {
                      "type": "string",
                      "nullable": true,
                      "description": "G\u0142\u00f3wny adres uczelni.",
                      "maxLength": 255
                    }
                  },
                  "required": ["name", "type", "city", "url"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["University structure"]
      }
    },
    "/api/core/department/": {
      "get": {
        "operationId": "listDepartments",
        "description": "",
        "parameters": [
          {
            "name": "university",
            "required": false,
            "in": "query",
            "description": "university",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "name": {
                        "type": "string",
                        "description": "Nazwa wydzia\u0142u (bez nazwy uczelni).",
                        "maxLength": 255
                      },
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "Adres strony internetowej wydzia\u0142u. Je\u015bli nie ma osobnej, zostawi\u0107 puste.",
                        "maxLength": 1024
                      },
                      "description": {
                        "type": "string",
                        "nullable": true,
                        "description": "Kr\u00f3tki opis wydzia\u0142u."
                      },
                      "address": {
                        "type": "string",
                        "nullable": true,
                        "description": "G\u0142\u00f3wny adres wydzia\u0142u.",
                        "maxLength": 255
                      },
                      "university": {
                        "type": "integer"
                      }
                    },
                    "required": ["name", "university"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["University structure"]
      }
    },
    "/api/core/department/{id}/": {
      "get": {
        "operationId": "retrieveDepartment",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this Wydzia\u0142.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "university",
            "required": false,
            "in": "query",
            "description": "university",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "name": {
                      "type": "string",
                      "description": "Nazwa wydzia\u0142u (bez nazwy uczelni).",
                      "maxLength": 255
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "Adres strony internetowej wydzia\u0142u. Je\u015bli nie ma osobnej, zostawi\u0107 puste.",
                      "maxLength": 1024
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "description": "Kr\u00f3tki opis wydzia\u0142u."
                    },
                    "address": {
                      "type": "string",
                      "nullable": true,
                      "description": "G\u0142\u00f3wny adres wydzia\u0142u.",
                      "maxLength": 255
                    },
                    "university": {
                      "type": "integer"
                    }
                  },
                  "required": ["name", "university"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["University structure"]
      }
    },
    "/api/core/tag/": {
      "get": {
        "operationId": "listTags",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "name": {
                        "type": "string",
                        "description": "Nazwa taga, np '\u015bcis\u0142e'.",
                        "maxLength": 255
                      }
                    },
                    "required": ["name"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Tags"]
      }
    },
    "/api/core/tag/{id}/": {
      "get": {
        "operationId": "retrieveTag",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this Tag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "name": {
                      "type": "string",
                      "description": "Nazwa taga, np '\u015bcis\u0142e'.",
                      "maxLength": 255
                    }
                  },
                  "required": ["name"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Tags"]
      }
    },
    "/api/core/field_of_study_group/": {
      "get": {
        "operationId": "listFieldOfStudyGroups",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "name": {
                        "type": "string",
                        "description": "Nazwa grupy kierunk\u00f3w, np. Bioinformatyka.",
                        "maxLength": 255
                      }
                    },
                    "required": ["name"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Field of study"]
      }
    },
    "/api/core/field_of_study_group/{id}/": {
      "get": {
        "operationId": "retrieveFieldOfStudyGroup",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this Grupa kierunk\u00f3w.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "name": {
                      "type": "string",
                      "description": "Nazwa grupy kierunk\u00f3w, np. Bioinformatyka.",
                      "maxLength": 255
                    }
                  },
                  "required": ["name"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Field of study"]
      }
    },
    "/api/core/field_of_study/": {
      "get": {
        "operationId": "listFieldOfStudys",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "name": {
                        "type": "string",
                        "description": "Pe\u0142na nazwa kierunku, np. 'Bioinforatyka i Biologia System\u00f3w'.",
                        "maxLength": 255
                      },
                      "specialty": {
                        "type": "string",
                        "nullable": true,
                        "description": "Specjalizacja/Specjalno\u015b\u0107.",
                        "maxLength": 255
                      },
                      "level": {
                        "enum": [
                          "licencjackie",
                          "in\u017cynierskie",
                          "magisterskie",
                          "jednolite_magisterskie",
                          "doktoranckie"
                        ],
                        "description": "Podzia\u0142 studi\u00f3w z Deklaracji Bolo\u0144skiej."
                      },
                      "description": {
                        "type": "string",
                        "nullable": true,
                        "description": "Opis kierunku studi\u00f3w."
                      },
                      "form": {
                        "enum": [
                          "stacjonarne",
                          "niestacjonarne",
                          "wieczorowe",
                          "eksternistyczne",
                          "indywidualne"
                        ]
                      },
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "nullable": true,
                        "description": "Adres strony internetowej kierunku (je\u015bli istnieje).",
                        "maxLength": 1024
                      },
                      "duration": {
                        "type": "integer",
                        "maximum": 2147483647,
                        "description": "Czas trwania studi\u00f3w w latach (je\u015bli nier\u00f3wna, zaokr\u0105gli\u0107 w g\u00f3r\u0119).",
                        "minimum": 0
                      },
                      "language": {
                        "type": "string",
                        "description": "J\u0119zyk, w kt\u00f3rym prowadzone s\u0105 zaj\u0119cia.",
                        "maxLength": 255
                      },
                      "department": {
                        "type": "integer",
                        "nullable": true
                      },
                      "university": {
                        "type": "integer"
                      },
                      "group": {
                        "type": "integer",
                        "nullable": true,
                        "description": "Przynale\u017cno\u015b\u0107 do wi\u0119kszej grupy kierunk\u00f3w (ten sam kierunek na kilku uczelniach)."
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        },
                        "description": "Tagi przypsane do kierunku."
                      }
                    },
                    "required": ["name", "level", "form", "university"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Field of study"]
      }
    },
    "/api/core/field_of_study/{id}/": {
      "get": {
        "operationId": "retrieveFieldOfStudy",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this Kierunek studi\u00f3w.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "name": {
                      "type": "string",
                      "description": "Pe\u0142na nazwa kierunku, np. 'Bioinforatyka i Biologia System\u00f3w'.",
                      "maxLength": 255
                    },
                    "specialty": {
                      "type": "string",
                      "nullable": true,
                      "description": "Specjalizacja/Specjalno\u015b\u0107.",
                      "maxLength": 255
                    },
                    "level": {
                      "enum": [
                        "licencjackie",
                        "in\u017cynierskie",
                        "magisterskie",
                        "jednolite_magisterskie",
                        "doktoranckie"
                      ],
                      "description": "Podzia\u0142 studi\u00f3w z Deklaracji Bolo\u0144skiej."
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "description": "Opis kierunku studi\u00f3w."
                    },
                    "form": {
                      "enum": [
                        "stacjonarne",
                        "niestacjonarne",
                        "wieczorowe",
                        "eksternistyczne",
                        "indywidualne"
                      ]
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "Adres strony internetowej kierunku (je\u015bli istnieje).",
                      "maxLength": 1024
                    },
                    "duration": {
                      "type": "integer",
                      "maximum": 2147483647,
                      "description": "Czas trwania studi\u00f3w w latach (je\u015bli nier\u00f3wna, zaokr\u0105gli\u0107 w g\u00f3r\u0119).",
                      "minimum": 0
                    },
                    "language": {
                      "type": "string",
                      "description": "J\u0119zyk, w kt\u00f3rym prowadzone s\u0105 zaj\u0119cia.",
                      "maxLength": 255
                    },
                    "department": {
                      "type": "integer",
                      "nullable": true
                    },
                    "university": {
                      "type": "integer"
                    },
                    "group": {
                      "type": "integer",
                      "nullable": true,
                      "description": "Przynale\u017cno\u015b\u0107 do wi\u0119kszej grupy kierunk\u00f3w (ten sam kierunek na kilku uczelniach)."
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "Tagi przypsane do kierunku."
                    }
                  },
                  "required": ["name", "level", "form", "university"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Field of study"]
      }
    },
    "/api/core/study_tag/": {
      "get": {
        "operationId": "listFieldOfStudy_tags",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "fieldofstudy": {
                        "type": "integer"
                      },
                      "tag": {
                        "type": "integer"
                      }
                    },
                    "required": ["fieldofstudy", "tag"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Tags"]
      }
    },
    "/api/core/study_tag/{id}/": {
      "get": {
        "operationId": "retrieveFieldOfStudy_tags",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this powi\u0105zanie fieldofstudy do tag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "fieldofstudy": {
                      "type": "integer"
                    },
                    "tag": {
                      "type": "integer"
                    }
                  },
                  "required": ["fieldofstudy", "tag"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Tags"]
      }
    },
    "/api/core/matura_version/": {
      "get": {
        "operationId": "listMaturaVersions",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "name": {
                        "type": "string",
                        "description": "Potoczna nazwa wersji matury.",
                        "maxLength": 255
                      },
                      "start": {
                        "type": "string",
                        "format": "date",
                        "description": "Data od kt\u00f3rej dana matura obowi\u0105zuje."
                      },
                      "end": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "description": "Data do kt\u00f3rej dana matura obowi\u0105zuje."
                      },
                      "default": {
                        "type": "boolean",
                        "description": "Czy jest to aktualnie obowi\u0105zuj\u0105ca matura."
                      }
                    },
                    "required": ["name", "start"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Matura"]
      }
    },
    "/api/core/matura_version/{id}/": {
      "get": {
        "operationId": "retrieveMaturaVersion",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this Wersja matury.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "name": {
                      "type": "string",
                      "description": "Potoczna nazwa wersji matury.",
                      "maxLength": 255
                    },
                    "start": {
                      "type": "string",
                      "format": "date",
                      "description": "Data od kt\u00f3rej dana matura obowi\u0105zuje."
                    },
                    "end": {
                      "type": "string",
                      "format": "date",
                      "nullable": true,
                      "description": "Data do kt\u00f3rej dana matura obowi\u0105zuje."
                    },
                    "default": {
                      "type": "boolean",
                      "description": "Czy jest to aktualnie obowi\u0105zuj\u0105ca matura."
                    }
                  },
                  "required": ["name", "start"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Matura"]
      }
    },
    "/api/core/recruitment/": {
      "get": {
        "operationId": "listRecruitments",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "year": {
                        "type": "integer",
                        "maximum": 2147483647,
                        "description": "Rok w kt\u00f3rym prowadzona jest rekrutacja.",
                        "minimum": 0
                      },
                      "start_date": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "Dok\u0142adna data i godzina, kiedy sterutje rekrutacja."
                      },
                      "end_date": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true,
                        "description": "Dok\u0142adna data i godzina, kiedy ko\u0144czy si\u0119 rekrutacja."
                      },
                      "phase": {
                        "type": "integer",
                        "maximum": 32767,
                        "description": "Kt\u00f3ra to tura rekrutacji.",
                        "minimum": 0
                      },
                      "admission_limit": {
                        "type": "integer",
                        "maximum": 32767,
                        "nullable": true,
                        "description": "Jaki jest limit miejsc w danej turze.",
                        "minimum": 0
                      },
                      "admissions": {
                        "type": "integer",
                        "maximum": 32767,
                        "nullable": true,
                        "description": "Ilo\u015b\u0107 os\u00f3b ch\u0119tnych w danej turze.",
                        "minimum": 0
                      },
                      "threshold": {
                        "type": "number",
                        "nullable": true,
                        "description": "Jaki jest pr\u00f3g punkt\u00f3w w danej turze."
                      },
                      "url": {
                        "type": "string",
                        "nullable": true,
                        "description": "Link do rekrutacji.",
                        "maxLength": 1024
                      },
                      "field_of_study": {
                        "type": "integer",
                        "description": "Kierunek studi\u00f3w, kt\u00f3rego dotyczy rekrutacja."
                      }
                    },
                    "required": ["year", "field_of_study"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Recruitment"]
      }
    },
    "/api/core/recruitment/{id}/": {
      "get": {
        "operationId": "retrieveRecruitment",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this Rekrutacja.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "year": {
                      "type": "integer",
                      "maximum": 2147483647,
                      "description": "Rok w kt\u00f3rym prowadzona jest rekrutacja.",
                      "minimum": 0
                    },
                    "start_date": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Dok\u0142adna data i godzina, kiedy sterutje rekrutacja."
                    },
                    "end_date": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Dok\u0142adna data i godzina, kiedy ko\u0144czy si\u0119 rekrutacja."
                    },
                    "phase": {
                      "type": "integer",
                      "maximum": 32767,
                      "description": "Kt\u00f3ra to tura rekrutacji.",
                      "minimum": 0
                    },
                    "admission_limit": {
                      "type": "integer",
                      "maximum": 32767,
                      "nullable": true,
                      "description": "Jaki jest limit miejsc w danej turze.",
                      "minimum": 0
                    },
                    "admissions": {
                      "type": "integer",
                      "maximum": 32767,
                      "nullable": true,
                      "description": "Ilo\u015b\u0107 os\u00f3b ch\u0119tnych w danej turze.",
                      "minimum": 0
                    },
                    "threshold": {
                      "type": "number",
                      "nullable": true,
                      "description": "Jaki jest pr\u00f3g punkt\u00f3w w danej turze."
                    },
                    "url": {
                      "type": "string",
                      "nullable": true,
                      "description": "Link do rekrutacji.",
                      "maxLength": 1024
                    },
                    "field_of_study": {
                      "type": "integer",
                      "description": "Kierunek studi\u00f3w, kt\u00f3rego dotyczy rekrutacja."
                    }
                  },
                  "required": ["year", "field_of_study"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Recruitment"]
      }
    },
    "/api/core/subject/": {
      "get": {
        "operationId": "listSubjects",
        "description": "",
        "parameters": [
          {
            "name": "matura_version",
            "required": false,
            "in": "query",
            "description": "matura_version",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_advanced",
            "required": false,
            "in": "query",
            "description": "is_advanced",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_oral",
            "required": false,
            "in": "query",
            "description": "is_oral",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "name": {
                        "type": "string",
                        "description": "Nazwa u\u017cywana we wzorach. Np. 'language_pl'.",
                        "maxLength": 255
                      },
                      "full_name": {
                        "type": "string",
                        "description": "Pe\u0142na nazwa do wy\u015bwietlania. Np. 'J\u0119zyk Polski',",
                        "maxLength": 255
                      },
                      "is_advanced": {
                        "type": "boolean",
                        "nullable": true,
                        "description": "Wybra\u0107 tylko je\u015bli dana matura rodziela ten przedmiot na dwa r\u00f3\u017cne poziomy. Np. 'language_pl_advanced'."
                      },
                      "is_oral": {
                        "type": "boolean",
                        "description": "Zaznaczy\u0107, je\u015bli dany przedmiot jest przedmiotem ustnym. Np. 'language_pl_oral'."
                      },
                      "matura_version": {
                        "type": "integer",
                        "description": "Zazwyczaj domy\u015blna matura (z *)."
                      }
                    },
                    "required": ["name", "full_name", "matura_version"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Subject"]
      }
    },
    "/api/core/subject/{id}/": {
      "get": {
        "operationId": "retrieveSubject",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this Przedmiot.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "matura_version",
            "required": false,
            "in": "query",
            "description": "matura_version",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_advanced",
            "required": false,
            "in": "query",
            "description": "is_advanced",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_oral",
            "required": false,
            "in": "query",
            "description": "is_oral",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "name": {
                      "type": "string",
                      "description": "Nazwa u\u017cywana we wzorach. Np. 'language_pl'.",
                      "maxLength": 255
                    },
                    "full_name": {
                      "type": "string",
                      "description": "Pe\u0142na nazwa do wy\u015bwietlania. Np. 'J\u0119zyk Polski',",
                      "maxLength": 255
                    },
                    "is_advanced": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "Wybra\u0107 tylko je\u015bli dana matura rodziela ten przedmiot na dwa r\u00f3\u017cne poziomy. Np. 'language_pl_advanced'."
                    },
                    "is_oral": {
                      "type": "boolean",
                      "description": "Zaznaczy\u0107, je\u015bli dany przedmiot jest przedmiotem ustnym. Np. 'language_pl_oral'."
                    },
                    "matura_version": {
                      "type": "integer",
                      "description": "Zazwyczaj domy\u015blna matura (z *)."
                    }
                  },
                  "required": ["name", "full_name", "matura_version"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Subject"]
      }
    },
    "/api/core/subject_weight/": {
      "get": {
        "operationId": "listSubjectWeights",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "readOnly": true
                      },
                      "weight": {
                        "type": "number",
                        "nullable": true,
                        "description": "Jak du\u017cy wp\u0142yw ma dany przedmiot na wynik wzoru."
                      },
                      "formula": {
                        "type": "integer"
                      },
                      "subject": {
                        "type": "integer"
                      }
                    },
                    "required": ["formula", "subject"]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Subject"]
      }
    },
    "/api/core/subject_weight/{id}/": {
      "get": {
        "operationId": "retrieveSubjectWeight",
        "description": "",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A unique integer value identifying this [autogenerated] Waga przedmiotu.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer",
                      "readOnly": true
                    },
                    "weight": {
                      "type": "number",
                      "nullable": true,
                      "description": "Jak du\u017cy wp\u0142yw ma dany przedmiot na wynik wzoru."
                    },
                    "formula": {
                      "type": "integer"
                    },
                    "subject": {
                      "type": "integer"
                    }
                  },
                  "required": ["formula", "subject"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Subject"]
      }
    },
    "/api/core/cities/": {
      "get": {
        "operationId": "listCities",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "name": {
                        "type": "string",
                        "readOnly": true
                      },
                      "popularity": {
                        "type": "integer",
                        "readOnly": true
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["University structure"]
      }
    },
    "/api/core/calculate/": {
      "post": {
        "operationId": "createCalculateRequest",
        "description": "",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "matura_version": {
                    "type": "integer",
                    "writeOnly": true
                  },
                  "matura_results": {
                    "type": "object",
                    "writeOnly": true
                  },
                  "cities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "writeOnly": true,
                    "nullable": true
                  },
                  "university": {
                    "type": "integer",
                    "nullable": true
                  },
                  "department": {
                    "type": "integer",
                    "nullable": true
                  },
                  "field_of_study": {
                    "type": "integer",
                    "nullable": true
                  }
                },
                "required": ["matura_version", "matura_results"]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "matura_version": {
                    "type": "integer",
                    "writeOnly": true
                  },
                  "matura_results": {
                    "type": "object",
                    "writeOnly": true
                  },
                  "cities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "writeOnly": true,
                    "nullable": true
                  },
                  "university": {
                    "type": "integer",
                    "nullable": true
                  },
                  "department": {
                    "type": "integer",
                    "nullable": true
                  },
                  "field_of_study": {
                    "type": "integer",
                    "nullable": true
                  }
                },
                "required": ["matura_version", "matura_results"]
              }
            },
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "matura_version": {
                    "type": "integer",
                    "writeOnly": true
                  },
                  "matura_results": {
                    "type": "object",
                    "writeOnly": true
                  },
                  "cities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "writeOnly": true,
                    "nullable": true
                  },
                  "university": {
                    "type": "integer",
                    "nullable": true
                  },
                  "department": {
                    "type": "integer",
                    "nullable": true
                  },
                  "field_of_study": {
                    "type": "integer",
                    "nullable": true
                  }
                },
                "required": ["matura_version", "matura_results"]
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "matura_version": {
                            "type": "integer",
                            "writeOnly": true
                          },
                          "matura_results": {
                            "type": "object",
                            "writeOnly": true
                          },
                          "cities": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "writeOnly": true,
                            "nullable": true
                          },
                          "university": {
                            "type": "integer",
                            "nullable": true
                          },
                          "department": {
                            "type": "integer",
                            "nullable": true
                          },
                          "field_of_study": {
                            "type": "integer",
                            "nullable": true
                          },
                          "result": {
                            "type": "number",
                            "readOnly": true
                          },
                          "threshold": {
                            "type": "number",
                            "readOnly": true,
                            "nullable": true
                          },
                          "formula_year": {
                            "type": "integer",
                            "readOnly": true,
                            "nullable": true
                          },
                          "threshold_year": {
                            "type": "integer",
                            "readOnly": true,
                            "nullable": true
                          },
                          "min_score": {
                            "type": "integer",
                            "readOnly": true
                          },
                          "max_score": {
                            "type": "integer",
                            "readOnly": true
                          }
                        },
                        "required": ["matura_version", "matura_results"]
                      }
                    }
                  },
                  "required": ["results"]
                }
              }
            },
            "description": ""
          }
        },
        "security": [],
        "tags": ["Calculate!!!"]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ]
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
kosciak9commented, Mar 23, 2020

yeah, sure! 😃

1reaction
fabien0102commented, Mar 17, 2020

Sure! I will look into this again too. And FYI TSLint is not Typescript ESLint, former is deprecated and latter is hard to setup 😄 Sent from ProtonMail mobile

I know, I know, I said ts-lint by habit 😅 I should say “your linter” 😁 to be fair I don’t even remember which one are we using, it’s setup and works, it’s all I ask from a linter 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ternary operator displays error in JSHint - Expected an ...
when I run my script in grunt JSHint hightlights this line as Expected an assignment or function call and instead saw an expression....
Read more >
expected an assignment or function call and ... - You.com
Fix expected an assignment or function call and instead saw an expression. This means that you have an expression but do not assign...
Read more >
Expected an assignment or function call and ... - GeeksforGeeks
Let's see an example by creating a simple React application that throws the same error.
Read more >
5.4 Expected an assignment or function call and instead saw ...
Is there anything wrong with my code? Code: var food = prompt(“What's for dinner?”); if (food === “taco”) { foodType = “Mexican”; } ......
Read more >
expected assignment or function call: no-unused-expressions ...
Interpreter thinks that you return undefined and doesn't check your next line. That's the return operator thing. Put your opened bracket on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found