Skip to content

Commit

Permalink
Small documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ivnglkv committed Aug 29, 2024
1 parent 0c74acb commit 00cfb6b
Show file tree
Hide file tree
Showing 6 changed files with 1,375 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ class PredictedElement(BaseModel):


class PredictionResponseModel(RootModel):
root: List[PredictedElement]
root: List[PredictedElement] = Field(
description=(
"List of page elements predicted by model. Is a subset of elements passed in the input. "
"This means that if an element is present on the web page, but was not passed in the request's "
"`elements` parameter, it will not be analysed by model."
),
)


class Attachment(BaseModel):
Expand Down Expand Up @@ -98,7 +104,10 @@ class PredictionRequest(BaseModel):
description=(
"Full HTML document for analysis. "
"Every element should have jdn-hash attribute, which value must be unique "
"across the document and should be unique across documents."
"across the document and should be unique across documents. If an element "
"is not assigned with the have jdn-hash attribute, it will not be possible "
"to refer to that element in `elements` array and model analysis will not be "
"performed for this element."
),
example=(
"<html lang=\"en\" jdn-hash=\"111111\">"
Expand All @@ -111,6 +120,7 @@ class PredictionRequest(BaseModel):
default="[]",
description=(
"JSON dumped to string, containing list of elements on page with some info about them.\n\n"
"This elements will be then analyzed by a model. List should contain at least one object.\n\n"
"Documentation for objects fields. Sometimes JS code is used to describe values. In this case `el` will "
"be used to refer to page element.\n\n"
"`tag_name`: Tag name of the element, uppercased. `el.tagName`\n\n"
Expand Down
1 change: 1 addition & 0 deletions asyncapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ components:
default: null
description: >-
Maximum amount of seconds which should be spent to find XPath expression for one element.
No limits are applied if the value is `null`.
example: 10
allow_indexes_at_the_beginning:
type: boolean
Expand Down
5 changes: 5 additions & 0 deletions docs/css/asyncapi.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/css/global.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
html{-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}
1,342 changes: 1,342 additions & 0 deletions docs/index.html

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/js/asyncapi-ui.min.js

Large diffs are not rendered by default.

0 comments on commit 00cfb6b

Please sign in to comment.