Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5394bcd
feat: use fern to generate sigarra sdk
limwa Oct 3, 2026
00b1113
feat(sigarra): document sigarra endpoints and authentication
limwa Oct 4, 2026
6ab3c5b
chore(sigarra): generate sdk
limwa Oct 4, 2026
ad72a04
docs(sigarra): drop TTS attribution from the spec
limwa Oct 4, 2026
1e12171
chore(sigarra): regenerate sdk
limwa Oct 4, 2026
f22ceea
fix: anonymize data
limwa Oct 15, 2026
19fb3a2
fix(sigarra): regenerate sdk after anonymizing spec
limwa Oct 22, 2026
7b4981e
refactor(sigarra): use english kebab-case operation ids
limwa Oct 22, 2026
efef044
docs(sigarra): tag openapi operations
limwa Oct 22, 2026
3964e8d
fix(sigarra): disable implicit retries
limwa Oct 22, 2026
595669e
ci: typecheck sigarra package
limwa Oct 22, 2026
a00bcd2
docs: document sigarra package
limwa Oct 22, 2026
65e7e4f
Merge remote-tracking branch 'origin/monorepo' into t3code/sigarra-sd…
limwa Oct 22, 2026
4a209c8
Merge remote-tracking branch 'origin/beta' into t3code/sigarra-sdk-fo…
limwa Oct 22, 2026
9546526
docs(sigarra): translate OpenAPI summaries and descriptions to English
limwa Oct 22, 2026
90d657e
ci(sigarra): check generated SDK is up to date on PRs
limwa Oct 22, 2026
fbee71d
ci(sigarra): run generated SDK check on drafts and bump actions
limwa Oct 22, 2026
f02fd2b
chore: ignore generated sigarra sdk in oxfmt
limwa Oct 22, 2026
8364db7
chore(sigarra): regenerate sdk
limwa Oct 22, 2026
55d70ac
fix(sigarra): tighten spec per review
limwa Oct 22, 2026
7484c86
docs(sigarra): drop the generating section from the package README
limwa Oct 22, 2026
15f655a
chore(sigarra): regenerate sdk
limwa Oct 22, 2026
0a6667f
docs(sigarra): document SDK generation workflow
limwa Oct 22, 2026
52fa83f
fix(sigarra): patch the passthrough retry default doc
limwa Oct 22, 2026
8de52d5
chore(sigarra): align typescript with the workspace
limwa Oct 22, 2026
633dc99
refactor(sigarra): share the faculty and language path parameters
limwa Oct 22, 2026
5c1d76c
chore: mark the generated sigarra sdk as generated
limwa Oct 22, 2026
d526ee2
docs(sigarra): show how to authenticate with session cookies
limwa Oct 22, 2026
b9b4746
chore(sigarra): regenerate sdk
limwa Oct 22, 2026
e25f5d5
docs: document the sigarra package in AGENTS.md
limwa Oct 22, 2026
2d46e6c
fix(sigarra): use examples for the faculty and language parameters
limwa Oct 22, 2026
1d50a6c
docs(sigarra): note which endpoints accept sessions from any IP
limwa Oct 22, 2026
bea5eca
chore(sigarra): regenerate sdk
limwa Oct 22, 2026
e31c92b
ci(sigarra): give the generation job a read-only token
limwa Oct 22, 2026
9658b5e
refactor(sigarra): remove the redirect-only FEUP entry point
limwa Oct 22, 2026
7b2e46b
chore(sigarra): regenerate sdk
limwa Oct 22, 2026
be22d02
ci: change name of sdk job
limwa Oct 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
".claude/skills/**",
".cursor/skills/**",
".devin/skills/**",
".pi/skills/**"
".pi/skills/**",
"packages/sigarra/src/generated"
],
"categories": {
"correctness": "error"
Expand Down
32 changes: 32 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "tts-monorepo",
"private": true,
"workspaces": [
"apps/*"
"apps/*",
"packages/*"
],
"scripts": {
"prepare": "husky",
Expand Down
1 change: 1 addition & 0 deletions packages/sigarra/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
20 changes: 20 additions & 0 deletions packages/sigarra/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# @tts/sigarra

TypeScript SDK for [SIGARRA](https://sigarra.up.pt), generated from [`openapi.json`](./openapi.json) with [Fern](https://buildwithfern.com).

```ts
import { SigarraClient } from '@tts/sigarra'

const sigarra = new SigarraClient()
await sigarra.feup.home()
```

## Generating

The generated SDK is committed under `src/generated`. After changing `openapi.json` or `fern/generators.yml`, regenerate it with:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

```sh
bun run generate
```

This runs `fern generate --local` and then `scripts/patch-generated.ts`, which fixes a type error in Fern's generated `Headers.ts`. Fern needs Docker (the Fern TypeScript generator runs in a container) and `node`. With Podman, unqualified image names such as `fernapi/fern-typescript-sdk` must resolve to Docker Hub; if they don't, point `CONTAINERS_REGISTRIES_CONF` to a file containing `unqualified-search-registries = ["docker.io"]`.
4 changes: 4 additions & 0 deletions packages/sigarra/fern/fern.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"organization": "niaefeup",
"version": "5.144.3"
}
18 changes: 18 additions & 0 deletions packages/sigarra/fern/generators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
#
# Output paths are relative to this file.
api:
specs:
- openapi: ../openapi.json
overrides: ./openapi-overrides.yml
default-group: typescript-sdk
groups:
typescript-sdk:
generators:
- name: fernapi/fern-typescript-sdk
version: 3.98.4
output:
location: local-file-system
path: ../src/generated
config:
namespaceExport: Sigarra
39 changes: 39 additions & 0 deletions packages/sigarra/fern/openapi-overrides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Fern-only adjustments; openapi.json stays the accurate description of SIGARRA.
#
# Fern can't generate cookie API keys (SI_SESSION / SI_SECURITY): it ignores them
# and makes every endpoint require the only scheme left, uportoOidc. So, for the
# SDK, drop authentication altogether (pass the session cookies through the
# client's `headers` option) and give auth.oidcToken its token as a plain header.
#
# Endpoints whose session is optional declare `security` explicitly in
# openapi.json, so they must be cleared here as well.
security: []
components:
securitySchemes:
uportoOidc: null
paths:
/auth/oidc/token:
get:
security: []
parameters:
- name: Authorization
in: header
required: true
description: "`Bearer <access token>`."
schema:
type: string
/{faculty}/{language}/web_page.inicial:
get:
security: []
/{faculty}/{language}/func_geral.formview:
get:
security: []
/{faculty}/{language}/fotografias_service.foto:
get:
security: []
/{faculty}/{language}/vld_validacao.sair:
get:
security: []
/{faculty}/{language}/ucurr_geral.ficha_uc_view:
get:
security: []
Loading
Loading