@@ -81,8 +81,8 @@ export function getLineNumberForPath(yaml, path) { | |||||
* YAML or JSON string | * YAML or JSON string | ||||
* @param {array} path | * @param {array} path | ||||
* an array of stings that constructs a | * an array of stings that constructs a | ||||
* JSON Path similiar to JSON Pointers(RFC 6901). The difference is, each | |||||
* component of path is an item of the array intead of beinf seperated with | |||||
* JSON Path similar to JSON Pointers(RFC 6901). The difference is, each | |||||
* component of path is an item of the array instead of being separated with | |||||
* slash(/) in a string | * slash(/) in a string | ||||
*/ | */ | ||||
export function positionRangeForPath(yaml, path) { | export function positionRangeForPath(yaml, path) { | ||||
@@ -1,6 +1,6 @@ | |||||
import React from "react" | import React from "react" | ||||
// Nothing by default- component can be overriden by another plugin. | |||||
// Nothing by default- component can be overridden by another plugin. | |||||
export default class JumpToPath extends React.Component { | export default class JumpToPath extends React.Component { | ||||
render() { | render() { | ||||
@@ -10,7 +10,7 @@ import { memoizedSampleFromSchema, memoizedCreateXMLExample } from "core/plugins | |||||
import win from "./window" | import win from "./window" | ||||
import cssEscape from "css.escape" | import cssEscape from "css.escape" | ||||
const DEFAULT_REPONSE_KEY = "default" | |||||
const DEFAULT_RESPONSE_KEY = "default" | |||||
export const isImmutable = (maybe) => Im.Iterable.isIterable(maybe) | export const isImmutable = (maybe) => Im.Iterable.isIterable(maybe) | ||||
@@ -128,7 +128,7 @@ export function systemThunkMiddleware(getSystem) { | |||||
export function defaultStatusCode ( responses ) { | export function defaultStatusCode ( responses ) { | ||||
let codes = responses.keySeq() | let codes = responses.keySeq() | ||||
return codes.contains(DEFAULT_REPONSE_KEY) ? DEFAULT_REPONSE_KEY : codes.filter( key => (key+"")[0] === "2").sort().first() | |||||
return codes.contains(DEFAULT_RESPONSE_KEY) ? DEFAULT_RESPONSE_KEY : codes.filter( key => (key+"")[0] === "2").sort().first() | |||||
} | } | ||||
@@ -193,7 +193,7 @@ export function highlight (el) { | |||||
// running through characters and highlighting | // running through characters and highlighting | ||||
while (prev2 = prev1, | while (prev2 = prev1, | ||||
// escaping if needed (with except for comments) | // escaping if needed (with except for comments) | ||||
// pervious character will not be therefore | |||||
// previous character will not be therefore | |||||
// recognized as a token finalize condition | // recognized as a token finalize condition | ||||
prev1 = tokenType < 7 && prev1 == "\\" ? 1 : chr | prev1 = tokenType < 7 && prev1 == "\\" ? 1 : chr | ||||
) { | ) { | ||||
@@ -6,7 +6,7 @@ Plugins allow you to add | |||||
- `statePlugins` | - `statePlugins` | ||||
- `selectors` - query the state | - `selectors` - query the state | ||||
- `reducers` - modify the state | - `reducers` - modify the state | ||||
- `actions` - fire and forget, that will eventually be handled by a reducer. You *can* rely on the result of async actions. But in general its not recommended | |||||
- `actions` - fire and forget, that will eventually be handled by a reducer. You *can* rely on the result of async actions. But in general it's not recommended | |||||
- `wrapActions` - replace an action with a wrapped action (useful for hooking into existing `actions`) | - `wrapActions` - replace an action with a wrapped action (useful for hooking into existing `actions`) | ||||
- `components` - React components | - `components` - React components | ||||
- `fn` - commons functions | - `fn` - commons functions | ||||
@@ -28,7 +28,7 @@ describe("oauth2", function () { | |||||
expect(win.open.calls[0].arguments[0]).toMatch("https://testAuthorizationUrl?response_type=code&redirect_uri=&state=") | expect(win.open.calls[0].arguments[0]).toMatch("https://testAuthorizationUrl?response_type=code&redirect_uri=&state=") | ||||
}) | }) | ||||
it("should append query paramters to authorizeUrl with query parameters", function() { | |||||
it("should append query parameters to authorizeUrl with query parameters", function() { | |||||
win.open = createSpy() | win.open = createSpy() | ||||
mockSchema.authorizationUrl = "https://testAuthorizationUrl?param=1" | mockSchema.authorizationUrl = "https://testAuthorizationUrl?param=1" | ||||
oauth2Authorize(authConfig) | oauth2Authorize(authConfig) | ||||
@@ -19,7 +19,7 @@ describe("Remote $ref rendering", function () { | |||||
}) | }) | ||||
it("renders a remote $ref correctly", function (client) { | it("renders a remote $ref correctly", function (client) { | ||||
mainPage.expect.element("#model-TestResponse > span > div > span > span > span.inner-object > table > tbody > tr:nth-child(2) > td:nth-child(2) > span > span > div > div > p").text.to.equal("this is a api2prop") | |||||
mainPage.expect.element("#model-TestResponse > span > div > span > span > span.inner-object > table > tbody > tr:nth-child(2) > td:nth-child(2) > span > span > div > div > p").text.to.equal("this is an api2prop") | |||||
client.end() | client.end() | ||||
}) | }) | ||||
@@ -21,7 +21,7 @@ components: | |||||
schemas: | schemas: | ||||
Api2Prop: | Api2Prop: | ||||
type: string | type: string | ||||
description: this is a api2prop | |||||
description: this is an api2prop | |||||
example: 'api1prop-value' | example: 'api1prop-value' | ||||
TestResponse2: | TestResponse2: | ||||