Context
Hi Stoplight team,
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
Current Behavior
As you can see, description and url got transformed, even though they are perfectly valid ones.
The emoji also gets transformed.
Expected Behavior
The string don't need to be wrapped with quotes and emoji transformed.
Or is there a specific reason or specification that is followed?
Possible Solution(s)
Maybe there's already an option to control the quotes or string escaping?
If there is a specification that requires the string escaping, that would also be a logical choice.
Context
Hi Stoplight team,
Wondering if it's possible to skip string quotes and characters escape?
Simple example:
Current Behavior
As you can see,
descriptionandurlgot transformed, even though they are perfectly valid ones.The emoji also gets transformed.
Expected Behavior
The string don't need to be wrapped with quotes and emoji transformed.
Or is there a specific reason or specification that is followed?
Possible Solution(s)
Maybe there's already an option to control the quotes or string escaping?
If there is a specification that requires the string escaping, that would also be a logical choice.