Skip to content

Conversation

@QcFe
Copy link
Member

@QcFe QcFe commented Dec 15, 2025

This pull request introduces a comprehensive initial setup for the Polito Students API TypeSpec project. It establishes the project structure, core API models, routes, and supporting developer tooling. The most important changes include the addition of foundational TypeSpec source files for the API, configuration for code generation and publishing, and improvements to the developer workflow through linting, formatting, and recommended extensions.

API Definition and Structure:

  • Added core TypeSpec files defining reusable models, utility types, and error handling in src/common.tsp.
  • Implemented main API entrypoint and service metadata in src/main.tsp, importing all route files and setting up OpenAPI integration.
  • Added detailed route and model definitions for authentication (src/routes/auth.tsp) and bookings (src/routes/bookings.tsp). [1] [2]
  • Included an example course file overview in src/examples/courses.tsp.

Build, Linting, and Automation:

  • Introduced a GitHub Actions workflow (.github/workflows/checks.yml) to enforce code quality, linting, compilation, and OpenAPI generation on pull requests and pushes.
  • Updated the publish workflow (.github/workflows/publish-client.yml) to build and publish the generated TypeScript client using Node.js and Java, aligning with the new build process.
  • Added openapitools.json to configure OpenAPI code generation, output directory, and generator options.
  • Added package.json with scripts for compiling, formatting, building, and generating the client, as well as managing dependencies.
  • Specified Node.js version in .nvmrc for consistent environment setup.

Developer Experience Enhancements:

  • Added VSCode recommendations for the TypeSpec extension and enabled format on save in workspace settings. [1] [2]

These changes lay the groundwork for further API development, client generation, and streamlined team collaboration.

@QcFe QcFe marked this pull request as ready for review December 15, 2025 11:04
@QcFe QcFe marked this pull request as draft December 15, 2025 11:05
@QcFe QcFe force-pushed the typespec branch 4 times, most recently from e29d1cf to e4bc246 Compare December 16, 2025 11:25
@QcFe QcFe marked this pull request as ready for review December 16, 2025 11:28
@QcFe QcFe requested a review from Copilot December 16, 2025 11:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces a comprehensive migration from a hand-written OpenAPI specification to a TypeSpec-based API definition for the Politecnico di Torino Students API. The migration establishes a structured project with source-controlled TypeSpec files that compile to OpenAPI 3.0, along with automated tooling for code generation, validation, and client SDK publishing.

Key changes:

  • Complete TypeSpec specification covering 13 API domains (auth, bookings, courses, exams, students, etc.)
  • Automated CI/CD workflows for linting, compilation, and TypeScript client generation
  • Developer tooling configuration (VSCode settings, formatting, Node.js version management)

Reviewed changes

Copilot reviewed 37 out of 40 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tspconfig.yaml TypeSpec compiler configuration for OpenAPI 3 emission
package.json Project dependencies, build scripts, and npm configuration
openapitools.json OpenAPI Generator settings for TypeScript client generation
.nvmrc Node.js version pinning (v20.19.6)
.github/workflows/checks.yml CI workflow for linting, compilation, and OpenAPI validation
.github/workflows/publish-client.yml Publishing workflow for generated TypeScript client
.vscode/settings.json VSCode workspace settings enabling format-on-save
.vscode/extensions.json Recommended TypeSpec VSCode extension
src/main.tsp Main API service definition with metadata and route imports
src/version.tsp API version constant definition
src/common.tsp Shared models, response aliases, and error types
src/routes/auth.tsp Authentication endpoints (login, MFA, service links)
src/routes/bookings.tsp Booking management endpoints and models
src/routes/courses.tsp Course operations including files, assignments, and lectures
src/routes/esc.tsp European Student Card management endpoints
src/routes/exams.tsp Exam booking and management operations
src/routes/job-offers.tsp Job offer listing and detail endpoints
src/routes/news.tsp News item retrieval operations
src/routes/offering.tsp Academic offering and degree program endpoints
src/routes/people.tsp People search and profile endpoints
src/routes/places.tsp Place, building, and site management operations
src/routes/student.tsp Student profile, grades, messages, and notifications
src/routes/surveys.tsp Survey listing endpoints
src/routes/tickets.tsp Support ticket management system
src/examples/*.tsp Example data constants for all route definitions
.github/copilot-instructions.md Comprehensive developer guide for TypeSpec patterns and conventions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@QcFe QcFe force-pushed the typespec branch 6 times, most recently from 902cc9f to 018db0a Compare December 17, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants