appreciate if anyone can help on my below queries.

  1. SharePoint list have swagger(json) files.
  2. How to read swagger form SharePoint list through problematically. Is it possible? If possible what are the components can be use design?

Any client side /Server side/ any tool?

Please advise on how to proceed.

1 Answer 1


For the reason why we cannot read JSON files in SharePoint:

The .json extension in out of the box SharePoint is reserved for .json enabled web services, specifically the REST API for client side operations. Due to a handler in the web.config file for the application, if you were even able to upload your .json files, you would get errors trying to access them due to the handler intervening. The extension is blocked to maintain integrity within the SharePoint product, which is why aspx and other web formats are blocked.

The workaround i can think of is to save your json content in to a txt file and still read them from JavaScript as JSON files or consume it through your HTML file, it would not make too much difference.

It has been talked before:Why is upload of JSON files prohibited?

I can upload .json file in sharepoint site but cant access the file in SharePoint 2010

  • 1
    Thank you very much your replay boss but if we want to display as swaager file ui how can we do it Aug 20, 2019 at 7:31
  • @sankajayaram If you mean the experience like an online editor inside the SP on-premise library, per my knowledge that is not doable.
    – Jerry_MSFT
    Aug 20, 2019 at 8:47
  • Not in library ..using through problematically to read json and present like swagger UI . but JSON file upload into SharePoint library.is there any way to do? Aug 20, 2019 at 8:56
  • Has anyone written a conversion engine that takes in swagger or OpenAPI spec 3.0 and generates a document from standard's .yaml or .json file formats? We did that for confluence, but I'd love to see one for SharePoint too.
    – benhorgen
    Oct 25, 2020 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.