Skip to content

Turn off string escaping and quotes transform #149

@vladshcherbin

Description

@vladshcherbin

Hey 👋

Wondering if it's possible to skip string quotes and characters escape?

Simple example:

openapi: 3.1.1
info:
  title: Store API
  description: Welcome to the API Documentation! 🚀
  version: 1.0.0
servers:
  - url: https://test.com/api
    description: Production Server
tags:
  - name: Categories
    description: Operations for managing categories
paths:
  /categories:
    get:
      summary: Get Categories
      description: Retrieve a list of all categories available in the store, along with their details
      operationId: getAllCategories
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Category'
              example:
                - id: 1
                  name: Books
                  slug: books
      tags:
        - Categories
components:
  schemas:
    Category:
      description: Represents a category in the store
      type: object
      properties:
        id:
          description: Unique ID of the category
          type: integer
          example: 1
        name:
          description: Unique name of the category
          type: string
          example: Shoes
        slug:
          description: Unique URL-friendly identifier of the category
          type: string
          example: shoes
      required:
        - id
        - name
        - slug

Playground diff:

image

As you can see, description and url got transformed, even though they are perfectly valid ones.

I'm perfectly fine with sorting, just don't need my string to be wrapped with quotes and emoji transformed to something horror-like looking.

Maybe there's already an option to turn this off?

Thanks

openapi-format - 1.24.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions