Swagger编辑器为以下json生成错误

时间:2016-09-19 15:57:34

标签: editor swagger

我是新来的招摇。以下是生成的错误:

✖ Swagger Error
A deterministic version of a JSON Schema object.
Jump to line 7
Details
 Object

{
  "swagger": "2.0",
   "info": {"description": "Fast Healthcare Interoperability Resources (FHIR, pronounced \"Fire\") defines a set of \"Resources\" that represent granular clinical concepts. The resources can be managed in isolation, or aggregated into complex documents. Technically, FHIR is designed for the web; the resources are based on simple XML or JSON structures, with an http-based RESTful protocol where each resource has predictable URL. Where possible, open internet standards are used for data representation. \n",
   "version":"1.1.1",
    "title": "FhirServer"
  },
  "definitions": {
     "Account": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description": "",
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string",
          "minLength": 1
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "text": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "minLength": 1
            },
            "div": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "status",
            "div"
          ]
        }
      },
      "required": [
        "resourceType",
        "id",
        "text"
      ]
    }

    },
    "paths": {

      },

    "schemes": [
    "http"
  ],
    "basePath": "/open",
"tags": [
    {
      "name": "Account"
    },
    {
      "name": "AllergyIntolerance"
    },
    {
      "name": "Appointment"
    },
    {
      "name": "AppointmentResponse"
    },
    {
      "name": "AuditEvent"
    },
    {
      "name": "Basic"
    },
    {
      "name": "Binary"
    },
    {
      "name": "BodySite"
    },
    {
      "name": "Bundle"
    },
    {
      "name": "CarePlan"
    },
    {
      "name": "Claim"
    },
    {
      "name": "ClaimResponse"
    },
    {
      "name": "ClinicalImpression"
    },
    {
      "name": "Communication"
    },
    {
      "name": "CommunicationRequest"
    },
    {
      "name": "Composition"
    },
    {
      "name": "ConceptMap"
    },
    {
      "name": "Condition"
    },
    {
      "name": "Conformance"
    },
    {
      "name": "Contract"
    },
    {
      "name": "Coverage"
    },
    {
      "name": "DataElement"
    },
    {
      "name": "DetectedIssue"
    },
    {
      "name": "Device"
    },
    {
      "name": "DeviceComponent"
    },
    {
      "name": "DeviceMetric"
    },
    {
      "name": "DeviceUseRequest"
    },
    {
      "name": "DeviceUseStatement"
    },
    {
      "name": "DiagnosticOrder"
    },
    {
      "name": "DiagnosticReport"
    },
    {
      "name": "DocumentManifest"
    },
    {
      "name": "DocumentReference"
    },
    {
      "name": "EligibilityRequest"
    },
    {
      "name": "EligibilityResponse"
    },
    {
      "name": "Encounter"
    },
    {
      "name": "EnrollmentRequest"
    },
    {
      "name": "EnrollmentResponse"
    },
    {
      "name": "EpisodeOfCare"
    },
    {
      "name": "ExplanationOfBenefit"
    },
    {
      "name": "FamilyMemberHistory"
    },
    {
      "name": "Flag"
    },
    {
      "name": "Goal"
    },
    {
      "name": "Group"
    },
    {
      "name": "HealthcareService"
    },
    {
      "name": "ImagingObjectSelection"
    },
    {
      "name": "ImagingStudy"
    },
    {
      "name": "Immunization"
    },
    {
      "name": "ImmunizationRecommendation"
    },
    {
      "name": "ImplementationGuide"
    },
    {
      "name": "List"
    },
    {
      "name": "Location"
    },
    {
      "name": "Media"
    },
    {
      "name": "Medication"
    },
    {
      "name": "MedicationAdministration"
    },
    {
      "name": "MedicationDispense"
    },
    {
      "name": "MedicationOrder"
    },
    {
      "name": "MedicationStatement"
    },
    {
      "name": "NamingSystem"
    },
    {
      "name": "NutritionOrder"
    },
    {
      "name": "Observation"
    },
    {
      "name": "OperationDefinition"
    },
    {
      "name": "OperationOutcome"
    },
    {
      "name": "Order"
    },
    {
      "name": "OrderResponse"
    },
    {
      "name": "Organization"
    },
    {
      "name": "Parameters"
    },
    {
      "name": "Patient"
    },
    {
      "name": "PaymentNotice"
    },
    {
      "name": "PaymentReconciliation"
    },
    {
      "name": "Person"
    },
    {
      "name": "Practitioner"
    },
    {
      "name": "Procedure"
    },
    {
      "name": "ProcedureRequest"
    },
    {
      "name": "ProcessRequest"
    },
    {
      "name": "ProcessResponse"
    },
    {
      "name": "Provenance"
    },
    {
      "name": "Questionnaire"
    },
    {
      "name": "QuestionnaireResponse"
    },
    {
      "name": "ReferralRequest"
    },
    {
      "name": "RelatedPerson"
    },
    {
      "name": "RiskAssessment"
    },
    {
      "name": "Schedule"
    },
    {
      "name": "SearchParameter"
    },
    {
      "name": "Slot"
    },
    {
      "name": "Specimen"
    },
    {
      "name": "StructureDefinition"
    },
    {
      "name": "Subscription"
    },
    {
      "name": "Substance"
    },
    {
      "name": "SupplyDelivery"
    },
    {
      "name": "SupplyRequest"
    },
    {
      "name": "TestScript"
    },
    {
      "name": "ValueSet"
    },
    {
      "name": "VisionPrescription"
    }
  ]
}

1 个答案:

答案 0 :(得分:0)

删除定义中的$schema属性。 OAI Specification

不允许这样做