Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10 from HighwayThree/adding_openapi_mime
Browse files Browse the repository at this point in the history
Adding openapi mimetype for file uploads
  • Loading branch information
ll911 authored Dec 21, 2016
2 parents 2427d39 + e57c1fd commit 9f10048
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ckanext/openapi/plugin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import mimetypes

import ckan.plugins as p
import ckan.plugins.toolkit as tk
Expand All @@ -20,8 +21,10 @@ class OpenApiViewPlugin(p.SingletonPlugin):
# IConfigurer

def update_config(self, config):
#mimetypes.add_type('application/openapi+json', '.json')

mimetypes.add_type('application/openapi+json', '.open-api')
mimetypes.add_type('application/openapi+json', '.openapi')
mimetypes.add_type('application/openapi+json', '.openapi-json')

p.toolkit.add_public_directory(config, 'public')
p.toolkit.add_template_directory(config, 'templates')

Expand Down

0 comments on commit 9f10048

Please sign in to comment.