Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Optional types in schema, ex: GET /employee returns values where id is optional

Open
#84 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
openapi

Research direction

Start with the OpenAPI/Swagger schema for Employee and compare the GET /employee response with the POST request model. Inspect how shared types mark id as optional, then use openapi-ts to verify the generated types. Done means the schema accurately distinguishes required response fields from fields that may be absent when creating an employee.

Written by the indexing model from the issue text.

Description

We are using https://openapi-ts.pages.dev/ to generate client code and there are optional types in Tripletex's swagger schema which I believe could have been marked as required. Example Employee and it's id:

image

This results in generated code where id is optional:

image

I'm guessing this may have to do something with type being used in multiple contexts, like when you POST a new employee? But it would have been nice to have accurate types for different operations :)

Dominant language
No language data
Stars
49
Forks
47
Avg merge
1h 1m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tripletex/tripletex-api2

All issues in Tripletex/tripletex-api2

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.