Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMAP-8: Json-editor v2.2.1 #50

Merged
merged 44 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
57fc236
avanzamento
May 8, 2020
78d066b
fix
May 8, 2020
f676a33
remove html example
May 8, 2020
b485dfb
fix proptypes
May 8, 2020
ecb372e
avanzamento
May 8, 2020
dcb2575
avanzamento
May 8, 2020
04c5b12
fix(MMAP-8): use 2.2.1 version
May 11, 2020
5618101
fix(MMAP-8): v2 json-editor
May 11, 2020
319b04d
change(MMAP-8): change Params test
May 11, 2020
5c9869c
Fix lint
May 11, 2020
505a9c0
Update packages/api-explorer/src/JsonForm/antd-theme-json-editor.js
dibericky May 12, 2020
63ecf38
chore(MMAP-8): resolved discussions
May 12, 2020
b658857
fix(MMAP-8): readded petstore with fix to use it
May 12, 2020
1f327ef
update(MMAP-8): fetch-har 2.2.0
May 12, 2020
e174ebf
minor(MMAP-8): refactor
May 12, 2020
46ee108
add alert error message
May 12, 2020
db9c033
refactor(MMAP-8): moved to external file
May 12, 2020
6aa9e2a
merge with master
May 12, 2020
e0f9669
improve test coverage
May 12, 2020
532e52a
en / it strings
May 13, 2020
531bfb3
external json example
May 13, 2020
e6fb8a4
rem(MMAP-8): removed forcePanelRender prop
fredmaggiowski May 13, 2020
e8f40e2
Merge branch 'MMAP-8-editor-v2' of https://github.com/mia-platform/ap…
May 13, 2020
12472fb
add example of bug
May 13, 2020
036814c
jsonform index test indent object
May 13, 2020
7b065fa
minor
May 13, 2020
92a55b2
jsonform test name & remove json case
May 13, 2020
7bd4972
restore global.open
May 13, 2020
fab0dbd
removed useless async
May 13, 2020
1db24af
removed space
May 13, 2020
8455ef7
fix huge jsonschema definitions
May 13, 2020
1091012
fix error
May 14, 2020
dd995d8
wip
May 14, 2020
6e2aa8f
clean code
May 18, 2020
17962b1
fix not scheme
May 18, 2020
fcc2f67
removed(MMAP-8): console log
May 18, 2020
b7ac5a3
add(MMAP-8): field example
May 18, 2020
424456d
Update packages/api-explorer/src/JsonForm/refReplacer.js
dibericky May 19, 2020
a0247b2
change(MMAP-8): increased max_depth
May 19, 2020
32b5182
Update packages/api-explorer/src/JsonForm/refReplacer.js
dibericky May 19, 2020
6bd2976
rename testdata and clean dependencies
May 19, 2020
cac8fe8
fix(MMAP-8): test
May 19, 2020
10c0a64
update json-editor
May 19, 2020
1eb75aa
fix import
May 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import resolveRootRef from '../../src/JsonForm/resolveRootRef'
import ROOT_REF_SCHEMA from '../testdata/config-root-ref-and-nested.json'
import EXPECTED_ROOT_REF from '../testdata/config-root-ref-and-nested.expected.json'
import EXPECTED_ROOT_REF from '../testdata/config-root-ref-and-nested.resolveRootRef.expected.json'
import CIRCULAR_ROOT_SCHEMA from '../testdata/circular-on-root.json'
import MISSING_REFERENCE from '../testdata/missing-reference.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
{
"components": {
"securitySchemes": {
"petstore_auth": {
"type": "oauth2",
"flows": {
"implicit": {
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
},
"_key": "petstore_auth"
},
"api_key": {
"type": "apiKey",
"name": "api_key",
"in": "header"
}
},
"schemas": {
"Order": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"petId": {
"type": "integer",
"format": "int64"
},
"quantity": {
"type": "integer",
"format": "int32"
},
"shipDate": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "string",
"description": "Order Status",
"enum": [
"placed",
"approved",
"delivered"
]
},
"complete": {
"type": "boolean",
"default": false
}
},
"xml": {
"name": "Order"
}
},
"Category": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
},
"xml": {
"name": "Category"
}
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"username": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"phone": {
"type": "string"
},
"userStatus": {
"type": "integer",
"format": "int32",
"description": "User Status"
}
},
"xml": {
"name": "User"
}
},
"Tag": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
},
"xml": {
"name": "Tag"
}
},
"Pet": {
"type": "object",
"required": [
"name",
"photoUrls"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"category": {
"$ref": "#/components/schemas/Category"
},
"name": {
"type": "string",
"example": "doggie"
},
"photoUrls": {
"type": "array",
"xml": {
"name": "photoUrl",
"wrapped": true
},
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"xml": {
"name": "tag",
"wrapped": true
},
"items": {
"$ref": "#/components/schemas/Tag"
}
},
"status": {
"type": "string",
"description": "pet status in the store",
"enum": [
"available",
"pending",
"sold"
]
}
},
"xml": {
"name": "Pet"
}
},
"ApiResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
},
"type": "object",
"required": [
"name",
"photoUrls"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"category": {
"$ref": "#/components/schemas/Category"
},
"name": {
"type": "string",
"example": "doggie"
},
"photoUrls": {
"type": "array",
"xml": {
"name": "photoUrl",
"wrapped": true
},
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"xml": {
"name": "tag",
"wrapped": true
},
"items": {
"$ref": "#/components/schemas/Tag"
}
},
"status": {
"type": "string",
"description": "pet status in the store",
"enum": [
"available",
"pending",
"sold"
]
}
},
"xml": {
"name": "Pet"
}
}
10 changes: 5 additions & 5 deletions packages/api-explorer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/api-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.13.0",
"@json-editor/json-editor": "2.2.1",
"@mia-platform/json-editor": "^2.3.0",
"@mia-platform/markdown": "^6.1.0",
"@mia-platform/oas-extensions": "^6.1.0",
"@mia-platform/syntax-highlighter": "^6.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-explorer/src/JsonForm/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '@fortawesome/fontawesome-free/js/brands'
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {injectIntl} from 'react-intl'
import {JSONEditor} from '@json-editor/json-editor'
import {JSONEditor} from '@mia-platform/json-editor/dist/jsoneditor'
import {Spin, Alert} from 'antd'

import configureJsonEditor from './configureJsonEditor'
Expand Down
2 changes: 1 addition & 1 deletion packages/api-explorer/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
rules: [
{
test: /\.js(x?)$/,
exclude: /node_modules\/(?!(@mia-platform\/syntax-highlighter|fetch-har))/,
exclude: /node_modules\/(?!(@mia-platform\/(syntax-highlighter|json-editor)|fetch-har))/,
dibericky marked this conversation as resolved.
Show resolved Hide resolved
use: {
loader: 'babel-loader',
options: {
Expand Down
2 changes: 1 addition & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
rules: [
{
test: /\.js(x?)$/,
exclude: /node_modules\/(?!(@mia-platform\/syntax-highlighter|swagger2openapi|fetch-har))/,
exclude: /node_modules\/(?!(@mia-platform\/(syntax-highlighter|json-editor)|swagger2openapi|fetch-har))/,
use: {
loader: 'babel-loader',
options: {
Expand Down