如何解决未定义错误的读取属性

问题描述

我正在学习招摇。我写了下面发布的代码,招摇给了我发布的错误。请告诉我如何修复它

我拥有的微服务在以下链接中:

http://127.0.0.1:5000/getdistance/12.497366,41.922782,-3.606997572,40.47416477

错误

Resolver errorCannot read property 'getdistance' of undefined

代码

openapi: '3.0.2'
info:
  title: &apiTitle "distance micro-service API."
  description: "This micro-service receives four comma separated GPS coordinates in the following order,startLongitude,startLatitude,endLongitude,endLatitude in the url. Then it receives a response in a form of json file. The json file is to be fetched for the distance which represents the distance between 
               the aforementioned GPS coordinates"
  version: '1.0'
  termsOfService: "http://127.0.0.1:5000/getdistance/terms"
  contact:
    name: " "
    url: "http://127.0.0.1:5000"
    email: "me@provider.com"
  license:
    name: "CC Attribution-ShareAlike 4.0 (CC BY-SA 4.0)"
    url: "https://openweathermap.org/price"
servers:
  - url: http://127.0.0.1:5000/getdistance/{originAndDestinationGPSCoords}
    variables:
      originAndDestinationGPSCoords:
        default: 13.404954,52.520008,29.924526,31.205753
    description: Local host test server. When accessed it will return the distance from Berlin to Alexandria in Egypt in kilometers.

  - url: http://127.0.0.1:5000/getdistance/{originAndDestinationGPSCoords}
    variables:
      originAndDestinationGPSCoords:
        default: 34.32995,27.91582,13.2227111,52.4079274
    description: Local host test server. When accessed it will return the distance from Sharm El Sheikh to KleinmachNow in Germany.

  - url: http://127.0.0.1:5000/getdistance/{originAndDestinationGPSCoords}
    variables:
      originAndDestinationGPSCoords:
        default: 12.496366,41.902782,40.47416477
    description: Local host test server. When accessed it will return the distance from Rome in Italy to Real Madrid in Spain.
     
  - url: http://127.0.0.1:5000/getdistance/{originAndDestinationGPSCoords}
    variables:
      originAndDestinationGPSCoords:
        default: 4.897070,52.377956,40.47416477
    description: Local host test server. When accessed it will return the distance from Amesterdam in Holland to Real Madrid in Spain.
paths:
  /getdistance/{originAndDestinationGPSCoords}:
    get:
      tags: 
        - get distance
        - get distance in kilometers
      summary: get the distance between two GPS coordinates in Kilometers.
      description:  > 
        originAndDestinationGPSCoords represents the start and end GPS coordinates in the following order longitude and latitude respectively. Passing the start and end
        GPS cootdinates in the URL will result in invoking and communicating with OpenRouteService. The latter service will send a response in a form of json
        file.The JSON file will be fetched for the distance. The distance fetched,is the distance between the GPS coordinates entered and it is in meters,however
        they are displayed to the users in Kilometers.
      parameters:
        - in: path
          name: originAndDestinationGPSCoords
          description: Start and end GPS coordinates as comma separated values in terms of longitude and latitude respectively. For example 
            12.497366,40.47416477
          required: true
          schema:
            type: string
          allowEmptyValue: false
      responses:
        '200':
          description: distance fetched successfully.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...