-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Original Issue link: encode/django-rest-framework#7204
YAML which is not throwing error:
swagger: '2.0'
info:
description: ''
version: 1.0.5
title: Swagger Petstore
termsOfService: 'http://swagger.io/terms/'
contact:
email: apiteam@swagger.io
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
host: petstore.swagger.io
basePath: /v2
tags:
- name: pet
description: Everything about your Pets
paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
consumes:
- application/json
produces:
- application/json
responses:
200:
description: ''
schema:
$ref: '#/definitions/Pet'
definitions:
Pet:
type: object
required:
- name
- photoUrls
properties:
id:
type: integer
format: int64
name:
type: string
example: doggie
pattern: '^(\d+\.)?(\d+\.)?(\*|\d+)$'
photoUrls:
type: array
xml:
wrapped: true
items:
type: string
xml:
name: photoUrl
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
xml:
name: Pet
Just replace single quote by double quote and error will come.
for example: '^(\d+\.)?(\d+\.)?(\*|\d+)$'
=> "^(\d+\.)?(\d+\.)?(\*|\d+)$"'
Metadata
Metadata
Assignees
Labels
No labels