Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignored Properties Warning #221

Closed
bdentino opened this issue Mar 3, 2017 · 0 comments
Closed

Ignored Properties Warning #221

bdentino opened this issue Mar 3, 2017 · 0 comments

Comments

@bdentino
Copy link

bdentino commented Mar 3, 2017

I'm getting a warning in the UI whenever I uncollapse the response schema for one of my routes that says something like Other properties are defined at the same level as $ref at "#/paths/~1companies/get/responses/200/schema". They are IGNORED according to the JsonSchema spec. I'm not sure if this is a bug or how to resolve this since according to my schema, $ref is the only property at that level.

Here's my schema (this is still a WIP). Is there anything invalid in here that would trigger that warning?

  "swagger": "2.0",
  "info": {
    "title": "Finbox.io API",
    "version": "0.0.0",
    "contact": {
      "email": "support@finbox.io"
    }
  },
  "paths": {
    "/companies": {
      "get": {
        "summary": "List Companies",
        "description": "Get a list of companies supported by finbox.io",
        "consumes": [
          
        ],
        "produces": [
          
        ],
        "tags": [
          
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "schema": {
              "$ref": "#/definitions/Companies"
            },
            "examples": {
              "application/json": [
                {
                  "ticker": "AAPL",
                  "uid": "FINBOX:AAPL",
                  "name": "Apple Inc",
                  "exchange": "Nasdaq"
                }
              ]
            }
          }
        }
      }
    },
    "/companies/:ticker/fair-value": {
      "get": {
        "summary": "Get Fair Values",
        "description": "Return a list of fair values computed for a company by finbox.io",
        "consumes": [
          
        ],
        "produces": [
          
        ],
        "tags": [
          
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "schema": {
              "$ref": "#/definitions/FairValues"
            },
            "examples": {
              "application/json": [
                
              ]
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Companies": {
      "title": "Companies",
      "type": "array",
      "items": {
        "$ref": "#/definitions/Company"
      }
    },
    "Company": {
      "title": "Company",
      "type": "object",
      "required": [
        "uid",
        "ticker",
        "name",
        "exchange"
      ],
      "properties": {
        "uid": {
          "type": "string",
          "example": "FINBOX:AAPL"
        },
        "ticker": {
          "type": "string",
          "example": "AAPL"
        },
        "name": {
          "type": "string",
          "example": "Apple Inc.",
          "x-faker": "company.companyName"
        },
        "exchange": {
          "type": "string",
          "example": "NasdaqGS",
          "x-chance": {
            "pickone": [
              [
                "NYSE",
                "Nadsaq"
              ]
            ]
          }
        }
      }
    },
    "FairValues": {
      "title": "FairValues",
      "type": "array",
      "items": {
        "$ref": "#/definitions/FairValue"
      }
    },
    "FairValue": {
      "title": "FairValue",
      "type": "object",
      "properties": {
        "model": {
          "$ref": "#/definitions/FairValueModel"
        },
        "high": {
          "$ref": "#/definitions/FairValueUpside"
        },
        "low": {
          "$ref": "#/definitions/FairValueUpside"
        }
      }
    },
    "FairValueModel": {
      "title": "FairValueModel",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "10Y DCF Growth"
        },
        "slug": {
          "type": "string",
          "example": "dcf-growth-exit-10y"
        },
        "updated": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "FairValueUpside": {
      "title": "FairValueUpside",
      "type": "object",
      "properties": {
        "price": {
          "type": "number"
        },
        "upside": {
          "type": "number"
        }
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant