Repository: freeCodeCamp/freeCodeCamp
File: api/src/schemas/user/get-session-user.ts (TypeScript)

Code before:
          name: Type.String(),
          partiallyCompletedChallenges: Type.Array(
            Type.Object({ id: Type.String(), completedDate: Type.Number() })
          ),
          picture: Type.String(),
          points: Type.Number(),
          portfolio: Type.Array(
            Type.Object({
              description: Type.String(),
              id: Type.String(),
              image: Type.String(),
              title: Type.String(),
              url: Type.String()
            })
          ),
          profileUI: Type.Optional(profileUI),
          sendQuincyEmail: Type.Boolean(),
          theme: Type.String(),
          twitter: Type.Optional(Type.String()),
          website: Type.Optional(Type.String()),
          yearsTopContributor: Type.Array(Type.String()), // TODO(Post-MVP): convert to number?
          isEmailVerified: Type.Boolean(),
          joinDate: Type.String(),
          savedChallenges: Type.Optional(Type.Array(savedChallenge)),
          username: Type.String(),
          usernameDisplay: Type.Union([Type.String(), Type.Null()]),
          userToken: Type.Optional(Type.String()),
          completedSurveys: Type.Array(
            Type.Object({
              title: Type.String(),
              responses: Type.Array(
                Type.Object({
                  question: Type.String(),
                  response: Type.String()
                })
              )
            })
          ),
          msUsername: Type.Optional(Type.String())
        })
      ),
      result: Type.String()
    }),
    500: Type.Object({
      user: Type.Object({}),
      result: Type.Literal('')
    })
  }
};


Review comment (suggestion):
```suggestion
          usernameDisplay: Type.String(),
```

Code after:
          name: Type.String(),
          partiallyCompletedChallenges: Type.Array(
            Type.Object({ id: Type.String(), completedDate: Type.Number() })
          ),
          picture: Type.String(),
          points: Type.Number(),
          portfolio: Type.Array(
            Type.Object({
              description: Type.String(),
              id: Type.String(),
              image: Type.String(),
              title: Type.String(),
              url: Type.String()
            })
          ),
          profileUI: Type.Optional(profileUI),
          sendQuincyEmail: Type.Boolean(),
          theme: Type.String(),
          twitter: Type.Optional(Type.String()),
          website: Type.Optional(Type.String()),
          yearsTopContributor: Type.Array(Type.String()), // TODO(Post-MVP): convert to number?
          isEmailVerified: Type.Boolean(),
          joinDate: Type.String(),
          savedChallenges: Type.Optional(Type.Array(savedChallenge)),
          username: Type.String(),
          usernameDisplay: Type.String(),
          userToken: Type.Optional(Type.String()),
          completedSurveys: Type.Array(
            Type.Object({
              title: Type.String(),
              responses: Type.Array(
                Type.Object({
                  question: Type.String(),
                  response: Type.String()
                })
              )
            })
          ),
          msUsername: Type.Optional(Type.String())
        })
      ),
      result: Type.String()
    }),
    500: Type.Object({
      user: Type.Object({}),
      result: Type.Literal('')
    })
  }
};