Skip to content

Not allowed to load local resource: file:///C:/api-reference/.... #82

@jaslam94

Description

@jaslam94

I have a valid Open API specification file.

Image

This is how the paths section looks in the specification.json file:

  "paths": {
    "/identity/roleClaim": {
      "get": {
        "tags": ["RoleClaim"],
        "summary": "Get All Role Claims(e.g. Product Create Permission)",
        "operationId": "RoleClaim_GetAll",
        "responses": {
          "200": {
            "description": "Status 200 OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultOfListOfRoleClaimResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "post": {
        "tags": ["RoleClaim"],
        "summary": "Add a Role Claim",
        "operationId": "RoleClaim_Post",
        "requestBody": {
          "x-name": "request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleClaimRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Status 200 OK ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultOfString"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/identity/roleClaim/{roleId}": {
      "get": {
        "tags": ["RoleClaim"],
        "summary": "Get All Role Claims By Id",
        "operationId": "RoleClaim_GetAllByRoleId",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200 OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultOfListOfRoleClaimResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/identity/roleClaim/{id}": {
      "delete": {
        "tags": ["RoleClaim"],
        "summary": "Delete a Role Claim",
        "operationId": "RoleClaim_Delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200 OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultOfString"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/identity/role": {
      "get": {
        "tags": ["Role"],
        "summary": "Get All Roles (basic, admin etc.)",
        "operationId": "Role_GetAll",
        "responses": {
          "200": {
            "description": "Status 200 OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultOfListOfRoleResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "post": {
        "tags": ["Role"],
        "summary": "Add a Role",
        "operationId": "Role_Post",
        "requestBody": {
          "x-name": "request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Status 200 OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultOfString"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    }
}

I can see the endpoints in the tabs list, but when I click on any endpoint, I receive an error in the browser console, and the definition does not appear.

Image

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions