Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:sky-uk/api-explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbcorreia committed Aug 12, 2016
2 parents 67b0179 + e68d7e6 commit 35006d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/widgets/TryOutWidgetTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class TryOutWidgetTab extends Component {
let uri = new URI(`${scheme}://${this.props.apis.host}${this.props.apis.basePath}${path}`)

uri.normalizePath()
uri = URI.decode(uri)

return uri.toString()
}
Expand Down
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class APIExplorer {
this.addSettingsPane('Custom Headers', CustomHeadersSettings)

this.LinkGenerator = new LinkGenerator()

this.basePath = '/'
}

/**
Expand Down Expand Up @@ -169,6 +171,11 @@ class APIExplorer {
return this
}

setBasePath (basePath) {
this.basePath = basePath
return this
}

/**
* Method of the fluent API used to start APIExplorer.
* Will dispach actions to process the configurations, and render the UI
Expand Down
2 changes: 1 addition & 1 deletion src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import NotFound from 'containers/NotFound'
export default function (store) {
return (
<Route>
<Route path='/' component={Application}>
<Route path={APIExplorer.basePath} component={Application}>
<IndexRoute component={Welcome} />
<Route path='operation/:id' component={OperationWidgetContainer} >
{APIExplorer.widgetTabs.map(widgetTab =>
Expand Down

0 comments on commit 35006d9

Please sign in to comment.