Add Techtenstein Slug API 1.0.0 - #2830
sathvic-kollu wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the initial OpenAPI 3.1.0 specification for the Techtenstein Slug API, which provides endpoints to convert text into URL-safe slugs via query parameters or a JSON body, as well as a health check endpoint. The feedback recommends adding validation constraints (such as minimum, maximum, and maxLength) to the 'max' and 'sep' parameters in both the query parameters and the SlugInput schema to prevent invalid inputs. Additionally, it is recommended to mark the properties of the SlugResult schema as required to improve API contract clarity and client SDK generation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| - name: max | ||
| in: query | ||
| schema: | ||
| type: integer | ||
| default: 60 | ||
| - name: sep | ||
| in: query | ||
| schema: | ||
| type: string | ||
| default: '-' | ||
| - name: lower | ||
| in: query | ||
| schema: | ||
| type: boolean | ||
| default: true |
There was a problem hiding this comment.
The query parameters max and sep lack validation constraints. Adding minimum, maximum, and maxLength constraints ensures that invalid inputs are rejected early at the API gateway or routing level, preventing potential issues or resource exhaustion.
- name: max
in: query
schema:
type: integer
default: 60
minimum: 1
maximum: 500
- name: sep
in: query
schema:
type: string
default: '-'
maxLength: 5
- name: lower
in: query
schema:
type: boolean
default: true| SlugInput: | ||
| type: object | ||
| required: [text] | ||
| properties: | ||
| text: { type: string, maxLength: 500 } | ||
| max: { type: integer, default: 60 } | ||
| sep: { type: string, default: '-' } | ||
| lower: { type: boolean, default: true } |
There was a problem hiding this comment.
The SlugInput schema lacks validation constraints on the max and sep properties. Adding minimum, maximum, and maxLength constraints improves API robustness and prevents unexpected inputs from reaching the application logic.
SlugInput:
type: object
required: [text]
properties:
text: { type: string, maxLength: 500 }
max: { type: integer, default: 60, minimum: 1, maximum: 500 }
sep: { type: string, default: '-', maxLength: 5 }
lower: { type: boolean, default: true }| SlugResult: | ||
| type: object | ||
| properties: | ||
| slug: { type: string } | ||
| length: { type: integer } | ||
| input_length: { type: integer } | ||
| processing_ms: { type: integer } |
There was a problem hiding this comment.
The SlugResult schema does not define any required properties. For better API contract clarity and more reliable client SDK generation, it is highly recommended to mark guaranteed response fields (such as slug, length, input_length, and processing_ms) as required.
SlugResult:
type: object
required: [slug, length, input_length, processing_ms]
properties:
slug: { type: string }
length: { type: integer }
input_length: { type: integer }
processing_ms: { type: integer }
No description provided.