MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index

mmo-api-operation

1 symbole · générée le 30 Nov 2026

element

mmo-api-operation

mmo-api-operation.jhs:1

One operation of an OpenAPI document, to try it (mmo-api-console): what it does, a form typed by its schemas -- a list of values is a select, a yes/no a switch, a number a number, a date a date --, its body as a form or as JSON, examples to start from, then the answer: its status in words, a tree of its JSON, its table, its raw text, its headers, the server's logs. Everything is text nodes: nothing of an answer is html.

<mmo-api-operation></mmo-api-operation>
Étend
CustomShadowElement
The console gives it what to show: `load`
operationElement.load({method: 'get', path: '/user/account.json', operation: api.paths['/user/account.json'].get, document: api});

Index

init()
load(what)Show an operation.
isDataRoute()
t(text, vars)
h(tag, attrs, children)
resolve(schema)
draw()Draw the whole panel from current.
isDryRun()
unsimulable()
examples()
parameters()
bodySchema()
body()
field(name, param, into, required, where)A field typed by its schema: a select for a list of values (and for an optional yes/no: unset, yes, no), a checkbox for a required yes/no, a number with its bounds, a date, else a text with its exa…
setField(input, value)
readField(field)
fillExample(example)Fill the form with an example: the operation's own (parameters, body, or value for the body), or one built from the schemas -- its example, its default, its first value, else a value of its type.
querySelectorAllOpenOptional()Open the optional parameters when one of them holds a value.
setBody(body)
setBodyMode(mode)Switch the body between its form and its JSON, carrying what was typed over.
readBodyForm()
showError(field, message)
build(check)
refreshBuilder() asyncDraw the data api's builder again, for the collection the form names: an entity to change or delete picked among those of the collection; for a list, its sort, its fields and its filters, from the …
fillEntities(collection, list) asyncOffer the first entities of $collection, by their title, to the entity picker.
snapshot(withBody)What makes this call again, to remember it (mmo-api-console's history): the operation, the values typed, the data api's query, the body if asked -- never a token, never an answer.
restore(snapshot) asyncFill the form from a snapshot (snapshot): the operation is the console's to open first.
diff(a, b)
comparison()
updateUrl()Show the url the form describes.
send(url) asyncSend the call the form describes, or the url given (a link of the answer: links.next).
statusText(status)What a status means, in words, and what to do.
drawResponse()Draw the last answer, or what to do before there is one.
dryRunReport(report)What a dry run would have done: the entities a commit would have created, changed or removed (each change shown), the mails, files, outside calls and jobs -- or that it changed nothing.
explanation(explained)
size(bytes)
rows(json)
tabContent(tab)
copy(kind) asyncCopy the call as a command or as code.

Méthodes39

load(what)

mmo-api-operation.jhs:30

Show an operation.

load(what)
whatObjectmethod, path, operation (its OpenAPI object), document (the whole document, for its $refs), headers (a function giving the headers of a call: who it is made as), curlToken (a function giving the token a copied curl shows, or null), confirm (a function asked before a call that writes), dryRun (whether the calls are dry runs), values (the parameters to fill in: {collection: 'orders'}), schemaOf (an async function giving the JSON schema of a collection's entities, for the data api's builder)

isDataRoute()

mmo-api-operation.jhs:45
isDataRoute()
retournebooleanwhether this is a route of the data api, whose collection gives a query builder

t(text, vars)

mmo-api-operation.jhs:51
t(text, vars = {})
text
vars = {}
retournestring$text translated, its {name} replaced by $vars'

h(tag, attrs, children)

mmo-api-operation.jhs:58
h(tag, attrs = null, ...children)
tag
attrs = null
...children
retourneElementMMO.core.dom.createElement: a string child is a text node

resolve(schema)

mmo-api-operation.jhs:66
resolve(schema)
schemaObject
retourneObjectthe schema a $ref points at, or the schema itself

examples()

mmo-api-operation.jhs:134
examples()
retourne?Elementthe examples to start from: one built from the schemas, and the operation's own

parameters()

mmo-api-operation.jhs:145
parameters()
retourne?Elementthe parameters' form, the required first, the optional folded

field(name, param, into, required, where)

mmo-api-operation.jhs:203

A field typed by its schema: a select for a list of values (and for an optional yes/no: unset, yes, no), a checkbox for a required yes/no, a number with its bounds, a date, else a text with its example as placeholder.

field(name, param, into, required, where)
namestring
paramObjectan OpenAPI parameter (schema, description, example), or a body property wrapped so
intoMapwhere the field is kept, by name
requiredboolean
wherestringpath, query, header, cookie, body
retourneElement

setField(input, value)

mmo-api-operation.jhs:253
setField(input, value)
inputElement@param {*} value set as the field shows it
value

readField(field)

mmo-api-operation.jhs:263
readField(field)
fieldObjectwhat field kept
retourneset: boolean, value: *, error: ?string} the value typed, converted by its type

fillExample(example)

mmo-api-operation.jhs:295

Fill the form with an example: the operation's own (parameters, body, or value for the body), or one built from the schemas -- its example, its default, its first value, else a value of its type.

fillExample(example)
example?Object

querySelectorAllOpenOptional()

mmo-api-operation.jhs:336

Open the optional parameters when one of them holds a value.

querySelectorAllOpenOptional()

setBodyMode(mode)

mmo-api-operation.jhs:359

Switch the body between its form and its JSON, carrying what was typed over.

setBodyMode(mode)
modestringform or json

readBodyForm()

mmo-api-operation.jhs:380
readBodyForm()
retournevalue: Object, valid: boolean} the body's form read, each field checked

showError(field, message)

mmo-api-operation.jhs:392
showError(field, message)
fieldObject@param {string} message shown under it
message

build(check)

mmo-api-operation.jhs:404
build(check = false)
check = falsebooleanshow the errors of the fields
retourne?{url: string, method: string, headers: Object, body: ?string} the call the form describes, null when a field is invalid

refreshBuilder()

asyncmmo-api-operation.jhs:474

Draw the data api's builder again, for the collection the form names: an entity to change or delete picked among those of the collection; for a list, its sort, its fields and its filters, from the collection's schema.

async refreshBuilder()
retournePromise<void>

fillEntities(collection, list)

asyncmmo-api-operation.jhs:563

Offer the first entities of $collection, by their title, to the entity picker.

async fillEntities(collection, list)
collectionstring
listHTMLDataListElement
retournePromise<void>

snapshot(withBody)

mmo-api-operation.jhs:583

What makes this call again, to remember it (mmo-api-console's history): the operation, the values typed, the data api's query, the body if asked -- never a token, never an answer.

snapshot(withBody = false)
withBody = falsebooleankeep the body (a call saved by hand; the history keeps none: it may hold personal data)
retourneObject{method, path, values, query, body}

restore(snapshot)

asyncmmo-api-operation.jhs:602

Fill the form from a snapshot (snapshot): the operation is the console's to open first.

async restore(snapshot)
snapshotObject
retournePromise<void>

diff(a, b)

mmo-api-operation.jhs:624
diff(a, b)
a*
b*
retourneArray<Array>what differs between two JSON values, path by path: [path, before, after] (undefined: absent)

comparison()

mmo-api-operation.jhs:642
comparison()
retourneElementthe answer against one pinned (the console's, in memory): what was added, removed, changed

send(url)

asyncmmo-api-operation.jhs:676

Send the call the form describes, or the url given (a link of the answer: links.next).

async send(url = null)
url = null?string
retournePromise<void>

statusText(status)

mmo-api-operation.jhs:726

What a status means, in words, and what to do.

statusText(status)
statusnumber
retournestring

dryRunReport(report)

mmo-api-operation.jhs:798

What a dry run would have done: the entities a commit would have created, changed or removed (each change shown), the mails, files, outside calls and jobs -- or that it changed nothing.

dryRunReport(report)
reportObjectthe answer's meta.dryRun
retourneElement

explanation(explained)

mmo-api-operation.jhs:825
explanation(explained)
explainedObjectwhat mmo.oauth's access/explain.json answers for the call
retourneElementwhy: each right checked, what decides it, the perimeter

rows(json)

mmo-api-operation.jhs:841
rows(json)
json*an answer
retourne?Array<Object>its entities as rows, when it holds a list of objects (data, or the answer itself)

copy(kind)

asyncmmo-api-operation.jhs:888

Copy the call as a command or as code. The token shown is the one the console gives (curlToken): never the session's cookie.

async copy(kind)
kindstringcurl or fetch