starter icon indicating copy to clipboard operation
starter copied to clipboard

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

Open jaslam94 opened this issue 7 months ago • 0 comments

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?

jaslam94 avatar May 28 '25 17:05 jaslam94