Skip to content

Add Techtenstein Slug API 1.0.0 - #2830

Open
sathvic-kollu wants to merge 1 commit into
APIs-guru:mainfrom
techtenstein-labs:add-techtenstein-slug
Open

sathvic-kollu wants to merge 1 commit into
APIs-guru:mainfrom
techtenstein-labs:add-techtenstein-slug

Conversation

@sathvic-kollu

Copy link
Copy Markdown

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +42 to +56
- 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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

Comment on lines +89 to +96
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 }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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 }

Comment on lines +97 to +103
SlugResult:
type: object
properties:
slug: { type: string }
length: { type: integer }
input_length: { type: integer }
processing_ms: { type: integer }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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 }

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.

1 participant