Skip to content

Mark GET /v2/place-categories and GET /v2/sites as public (@useAuth(NoAuth)) - #95

Closed
kinlane wants to merge 1 commit into
polito:masterfrom
api-evangelist:public-places-noauth
Closed

kinlane wants to merge 1 commit into
polito:masterfrom
api-evangelist:public-places-noauth

Conversation

@kinlane

@kinlane kinlane commented Nov 12, 2026

Copy link
Copy Markdown

Hi! I'm Kin Lane from API Evangelist, which runs apis.io, a public catalog of API providers and their OpenAPI contracts. Politecnico di Torino's API is listed there, built from the dist/ specs in this repository.

What this work is. We're certifying OpenAPI operations by actually calling them. For each operation, we send a real request and check the response against your own contract. This is about more than whether the API answers 200: it tells developers, and the SDK and MCP generators and AI agents that read your spec, that each operation behaves the way the contract says. Verified operations get a conformant badge on your apis.io listing. We record only status codes, field names and whether the body matched the schema, never any response data.

What we found. Both specs apply BearerAuth globally, so these two operations are documented as requiring a token:

  • GET /v2/place-categories
  • GET /v2/sites

On 2026-11-11 we called both with no Authorization header. Both returned 200 with a body that validates against your declared response schema. The evidence is public: https://artifacts.apis.io/politecnico-di-torino/certification/status.yml

If these are meant to be public, the contract is currently telling client generators to require a token for nothing, and telling agents they can't use these operations anonymously.

The change. @useAuth(NoAuth) on the two operations, the same pattern you already use for POST /auth/login. I also hand-applied the matching security: [{}] lines to both dist/ specs, placed where your emitter puts them for /auth/login, so the PR is complete without a rebuild. Please run npm run compile to confirm the output is identical. I didn't run your toolchain locally.

If they're meant to require auth and the server is just lenient today, then the fix is on the server side, and please close this. That's useful to know too.

We've applied the same fix to our own copy of the contract on apis.io as an overlay, so nothing depends on this PR merging. Thanks for publishing your spec in the open. It's what made this check possible.

Kin Lane, API Evangelist / apis.io

🤖 Generated with Claude Code

Both inherit the global BearerAuth requirement but answer 200 with a
schema-valid body when called without a token. Use @useAuth(NoAuth), as
POST /auth/login already does, and apply the matching security: [{}] to
the dist specs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@QcFe

QcFe commented Nov 12, 2026

Copy link
Copy Markdown
Member

Hi Kin,

Thanks for taking the time to look into this.

The authentication behavior is intentional. The API is also used by the university's public website, particularly in the maps section, which is why some endpoints are accessible without authentication. However, the response content can differ depending on whether the request is authenticated, so documenting authentication remains important.

While we appreciate the interest, aligning our API specification with external certification criteria isn't a priority for this project, especially when the current behavior is intentional and serves our use cases.

We'll therefore close this PR without merging it.

Thanks again for your time and understanding.

🤖 Generated with ChatGPT.

@QcFe QcFe closed this Nov 12, 2026
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