2
0
mirror of https://github.com/inventree/schema.git synced 2025-04-27 20:46:49 +00:00

Update API schema for 317 / 157cbbead5043e091a060fae7d7938904ee155c1

This commit is contained in:
Matthias Mair 2025-03-01 12:56:14 +01:00
parent e582de9e12
commit 32f1235a29
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
4 changed files with 38278 additions and 0 deletions

35454
export/317/api.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,699 @@
- body: ''
library: ''
meta: {}
name: addslashes
title: 'Add slashes before quotes. Useful for escaping strings in CSV, for
example. Less useful for escaping JavaScript; use the ``escapejs``
filter instead.'
- body: ''
library: ''
meta: {}
name: capfirst
title: Capitalize the first character of the value.
- body: ''
library: ''
meta: {}
name: escapejs
title: Hex encode characters for use in JavaScript strings.
- body: ''
library: ''
meta: {}
name: json_script
title: 'Output value JSON-encoded, wrapped in a <script type="application/json">
tag (with an optional id).'
- body: 'If called without an argument, display the floating point number with one
decimal place -- but only if there''s a decimal place to be displayed:
* num1 = 34.23234
* num2 = 34.00000
* num3 = 34.26000
* {{ num1|floatformat }} displays "34.2"
* {{ num2|floatformat }} displays "34"
* {{ num3|floatformat }} displays "34.3"
If arg is positive, always display exactly arg number of decimal places:
* {{ num1|floatformat:3 }} displays "34.232"
* {{ num2|floatformat:3 }} displays "34.000"
* {{ num3|floatformat:3 }} displays "34.260"
If arg is negative, display arg number of decimal places -- but only if
there are places to be displayed:
* {{ num1|floatformat:"-3" }} displays "34.232"
* {{ num2|floatformat:"-3" }} displays "34"
* {{ num3|floatformat:"-3" }} displays "34.260"
If arg has the ''g'' suffix, force the result to be grouped by the
THOUSAND_SEPARATOR for the active locale. When the active locale is
en (English):
* {{ 6666.6666|floatformat:"2g" }} displays "6,666.67"
* {{ 10000|floatformat:"g" }} displays "10,000"
If arg has the ''u'' suffix, force the result to be unlocalized. When the
active locale is pl (Polish):
* {{ 66666.6666|floatformat:"2" }} displays "66666,67"
* {{ 66666.6666|floatformat:"2u" }} displays "66666.67"
If the input float is infinity or NaN, display the string representation
of that value.'
library: ''
meta: {}
name: floatformat
title: Display a float to a specified number of decimal places.
- body: ''
library: ''
meta: {}
name: iriencode
title: Escape an IRI value for use in a URL.
- body: ''
library: ''
meta: {}
name: linenumbers
title: Display text with line numbers.
- body: ''
library: ''
meta: {}
name: lower
title: Convert a string into all lowercase.
- body: 'For an integer, it''s a list of digits.
For a string, it''s a list of characters.'
library: ''
meta: {}
name: make_list
title: Return the value turned into a list.
- body: ''
library: ''
meta: {}
name: slugify
title: 'Convert to ASCII. Convert spaces to hyphens. Remove characters that aren''t
alphanumerics, underscores, or hyphens. Convert to lowercase. Also strip
leading and trailing whitespace.'
- body: 'This specifier uses Python string formatting syntax, with the exception
that the leading "%" is dropped.
See https://docs.python.org/library/stdtypes.html#printf-style-string-formatting
for documentation of Python string formatting.'
library: ''
meta: {}
name: stringformat
title: Format the variable according to the arg, a string formatting specifier.
- body: ''
library: ''
meta: {}
name: title
title: Convert a string into titlecase.
- body: ''
library: ''
meta: {}
name: truncatechars
title: Truncate a string after `arg` number of characters.
- body: ''
library: ''
meta: {}
name: truncatechars_html
title: 'Truncate HTML after `arg` number of chars.
Preserve newlines in the HTML.'
- body: ''
library: ''
meta: {}
name: truncatewords
title: 'Truncate a string after `arg` number of words.
Remove newlines within the string.'
- body: ''
library: ''
meta: {}
name: truncatewords_html
title: 'Truncate HTML after `arg` number of words.
Preserve newlines in the HTML.'
- body: ''
library: ''
meta: {}
name: upper
title: Convert a string into all uppercase.
- body: 'The ``safe`` parameter determines the characters which should not be
escaped by Python''s quote() function. If not provided, use the default safe
characters (but an empty string can be provided when *all* characters
should be escaped).'
library: ''
meta: {}
name: urlencode
title: Escape a value for use in a URL.
- body: ''
library: ''
meta: {}
name: urlize
title: Convert URLs in plain text into clickable links.
- body: ''
library: ''
meta:
Argument: Length to truncate URLs to.
name: urlizetrunc
title: 'Convert URLs into clickable links, truncating URLs to the given character
limit, and adding ''rel=nofollow'' attribute to discourage spamming.'
- body: ''
library: ''
meta: {}
name: wordcount
title: Return the number of words.
- body: ''
library: ''
meta: {}
name: wordwrap
title: Wrap words at `arg` line length.
- body: ''
library: ''
meta: {}
name: ljust
title: Left-align the value in a field of a given width.
- body: ''
library: ''
meta: {}
name: rjust
title: Right-align the value in a field of a given width.
- body: ''
library: ''
meta: {}
name: center
title: Center the value in a field of a given width.
- body: ''
library: ''
meta: {}
name: cut
title: Remove all values of arg from the given string.
- body: ''
library: ''
meta: {}
name: escape
title: Mark the value as a string that should be auto-escaped.
- body: ''
library: ''
meta: {}
name: force_escape
title: 'Escape a string''s HTML. Return a new string containing the escaped
characters (as opposed to "escape", which marks the content for later
possible escaping).'
- body: ''
library: ''
meta: {}
name: linebreaks
title: 'Replace line breaks in plain text with appropriate HTML; a single
newline becomes an HTML line break (``<br>``) and a new line
followed by a blank line becomes a paragraph break (``</p>``).'
- body: ''
library: ''
meta: {}
name: linebreaksbr
title: 'Convert all newlines in a piece of plain text to HTML line breaks
(``<br>``).'
- body: ''
library: ''
meta: {}
name: safe
title: Mark the value as a string that should not be auto-escaped.
- body: ''
library: ''
meta: {}
name: safeseq
title: 'A "safe" filter for sequences. Mark each element in the sequence,
individually, as safe, after converting them to strings. Return a list
with the results.'
- body: ''
library: ''
meta: {}
name: striptags
title: Strip all [X]HTML tags.
- body: ''
library: ''
meta: {}
name: dictsort
title: 'Given a list of dicts, return that list sorted by the property given in
the argument.'
- body: ''
library: ''
meta: {}
name: dictsortreversed
title: 'Given a list of dicts, return that list sorted in reverse order by the
property given in the argument.'
- body: ''
library: ''
meta: {}
name: first
title: Return the first item in a list.
- body: ''
library: ''
meta: {}
name: join
title: Join a list with a string, like Python's ``str.join(list)``.
- body: ''
library: ''
meta: {}
name: last
title: Return the last item in a list.
- body: ''
library: ''
meta: {}
name: length
title: Return the length of the value - useful for lists.
- body: ''
library: ''
meta: {}
name: length_is
title: Return a boolean of whether the value's length is the argument.
- body: ''
library: ''
meta: {}
name: random
title: Return a random item from the list.
- body: ''
library: ''
meta: {}
name: slice
title: Return a slice of the list using the same syntax as Python's list slicing.
- body: "Assume the list is in the proper format. For example, if ``var`` contains:\n\
``['States', ['Kansas', ['Lawrence', 'Topeka'], 'Illinois']]``, then\n``{{\
\ var|unordered_list }}`` returns::\n\n <li>States\n <ul>\n \
\ <li>Kansas\n <ul>\n <li>Lawrence</li>\n\
\ <li>Topeka</li>\n </ul>\n </li>\n\
\ <li>Illinois</li>\n </ul>\n </li>"
library: ''
meta: {}
name: unordered_list
title: 'Recursively take a self-nested list and return an HTML unordered list
--
WITHOUT opening and closing <ul> tags.'
- body: ''
library: ''
meta: {}
name: add
title: Add the arg to the value.
- body: ''
library: ''
meta: {}
name: get_digit
title: 'Given a whole number, return the requested digit of it, where 1 is the
right-most digit, 2 is the second-right-most digit, etc. Return the
original value for invalid input (if input or argument is not an integer,
or if argument is less than 1). Otherwise, output is always an integer.'
- body: ''
library: ''
meta: {}
name: date
title: Format a date according to the given format.
- body: ''
library: ''
meta: {}
name: time
title: Format a time according to the given format.
- body: ''
library: ''
meta: {}
name: timesince
title: Format a date as the time since that date (i.e. "4 days, 6 hours").
- body: ''
library: ''
meta: {}
name: timeuntil
title: Format a date as the time until that date (i.e. "4 days, 6 hours").
- body: ''
library: ''
meta: {}
name: default
title: If value is unavailable, use given default.
- body: ''
library: ''
meta: {}
name: default_if_none
title: If value is None, use given default.
- body: ''
library: ''
meta: {}
name: divisibleby
title: Return True if the value is divisible by the argument.
- body: "========== ====================== ==================================\n\
Value Argument Outputs\n========== ======================\
\ ==================================\n``True`` ``\"yeah,no,maybe\"`` \
\ ``yeah``\n``False`` ``\"yeah,no,maybe\"`` ``no``\n``None`` ``\"\
yeah,no,maybe\"`` ``maybe``\n``None`` ``\"yeah,no\"`` ``\"\
no\"`` (converts None to False\n if no\
\ mapping for None is given.\n========== ====================== =================================="
library: ''
meta: {}
name: yesno
title: 'Given a string mapping values for true, false, and (optionally) None,
return one of those strings according to the value:'
- body: ''
library: ''
meta: {}
name: filesizeformat
title: 'Format the value like a ''human-readable'' file size (i.e. 13 KB, 4.1
MB,
102 bytes, etc.).'
- body: '* If value is 0, vote{{ value|pluralize }} display "votes".
* If value is 1, vote{{ value|pluralize }} display "vote".
* If value is 2, vote{{ value|pluralize }} display "votes".
If an argument is provided, use that string instead:
* If value is 0, class{{ value|pluralize:"es" }} display "classes".
* If value is 1, class{{ value|pluralize:"es" }} display "class".
* If value is 2, class{{ value|pluralize:"es" }} display "classes".
If the provided argument contains a comma, use the text before the comma
for the singular case and the text after the comma for the plural case:
* If value is 0, cand{{ value|pluralize:"y,ies" }} display "candies".
* If value is 1, cand{{ value|pluralize:"y,ies" }} display "candy".
* If value is 2, cand{{ value|pluralize:"y,ies" }} display "candies".'
library: ''
meta: {}
name: pluralize
title: 'Return a plural suffix if the value is not 1, ''1'', or an object of
length 1. By default, use ''s'' as the suffix:'
- body: ''
library: ''
meta: {}
name: phone2numeric
title: Take a phone number and converts it in to its numerical equivalent.
- body: ''
library: ''
meta: {}
name: pprint
title: A wrapper around pprint.pprint -- for debugging, really.
- body: ''
library: admin_modify
meta: {}
name: cell_count
title: Return the number of cells used in a tabular inline.
- body: ''
library: admin_urls
meta: {}
name: admin_urlname
title: ''
- body: ''
library: admin_urls
meta: {}
name: admin_urlquote
title: ''
- body: ''
library: flags_debug
meta: {}
name: bool_enabled
title: ''
- body: ''
library: flags_debug
meta: {}
name: conditions_without_bool
title: ''
- body: ''
library: flags_debug
meta: {}
name: required_conditions_without_bool
title: ''
- body: ''
library: flags_debug
meta: {}
name: state_str
title: Construct a string that describes the current state of the flag
- body: ''
library: humanize
meta: {}
name: ordinal
title: 'Convert an integer to its ordinal as a string. 1 is ''1st'', 2 is ''2nd'',
3 is ''3rd'', etc. Works for any integer.'
- body: ''
library: humanize
meta: {}
name: intcomma
title: 'Convert an integer to a string containing commas every three digits.
For example, 3000 becomes ''3,000'' and 45000 becomes ''45,000''.'
- body: ''
library: humanize
meta: {}
name: intword
title: 'Convert a large integer to a friendly text representation. Works best
for numbers over 1 million. For example, 1000000 becomes ''1.0 million'',
1200000 becomes ''1.2 million'' and ''1200000000'' becomes ''1.2 billion''.'
- body: ''
library: humanize
meta: {}
name: apnumber
title: 'For numbers 1-9, return the number spelled out. Otherwise, return the
number. This follows Associated Press style.'
- body: ''
library: humanize
meta: {}
name: naturalday
title: 'For date values that are tomorrow, today or yesterday compared to
present day return representing string. Otherwise, return a string
formatted according to settings.DATE_FORMAT.'
- body: ''
library: humanize
meta: {}
name: naturaltime
title: 'For date and time values show how many seconds, minutes, or hours ago
compared to current timestamp return representing string.'
- body: ''
library: i18n
meta: {}
name: language_name
title: ''
- body: ''
library: i18n
meta: {}
name: language_name_translated
title: ''
- body: ''
library: i18n
meta: {}
name: language_name_local
title: ''
- body: ''
library: i18n
meta: {}
name: language_bidi
title: ''
- body: ''
library: inventree_extras
meta:
Usage: ''
name: keyvalue
title: Access to key of supplied dict.
- body: ''
library: l10n
meta: {}
name: localize
title: 'Force a value to be rendered as a localized value,
regardless of the value of ``settings.USE_L10N``.'
- body: ''
library: l10n
meta: {}
name: unlocalize
title: 'Force a value to be rendered as a non-localized value,
regardless of the value of ``settings.USE_L10N``.'
- body: ''
library: markdownify
meta: {}
name: markdownify
title: ''
- body: " new_level\n ``True`` if the current item is the start of a new\
\ level in\n the tree, ``False`` otherwise.\n\n closed_levels\n \
\ A list of levels which end after the current item. This will\n be\
\ an empty list if the next item is at the same level as the\n current\
\ item.\n\nUsing this filter with unpacking in a ``{% for %}`` tag, you should\n\
have enough information about the tree structure to create a\nhierarchical\
\ representation of the tree.\n\nExample::\n\n {% for genre,structure in\
\ genres|tree_info %}\n {% if structure.new_level %}<ul><li>{% else %}</li><li>{%\
\ endif %}\n {{ genre.name }}\n {% for level in structure.closed_levels\
\ %}</li></ul>{% endfor %}\n {% endfor %}"
library: mptt_tags
meta: {}
name: tree_info
title: 'Given a list of tree items, produces doubles of a tree item and a
``dict`` containing information about the tree structure around the
item, with the following contents:'
- body: "Each path item will be coerced to unicode, so a list of model\ninstances\
\ may be given if required.\n\nExample::\n\n {{ some_list|tree_path }}\n\
\ {{ some_node.get_ancestors|tree_path:\" > \" }}"
library: mptt_tags
meta: {}
name: tree_path
title: 'Creates a tree path represented by a list of ``items`` by joining
the items with a ``separator``.'
- body: ''
library: mptt_tags
meta: {}
name: cache_tree_children
title: Alias to `mptt.utils.get_cached_trees`.
- body: ''
library: rest_framework
meta: {}
name: with_location
title: ''
- body: ''
library: rest_framework
meta: {}
name: as_string
title: ''
- body: ''
library: rest_framework
meta: {}
name: as_list_of_strings
title: ''
- body: "Inserts classes into template variables that contain HTML tags,\nuseful\
\ for modifying forms without needing to change the Form objects.\n\nUsage:\n\
\n {{ field.label_tag|add_class:\"control-label\" }}\n\nIn the case of\
\ REST Framework, the filter is used to add Bootstrap-specific\nclasses to\
\ the forms."
library: rest_framework
meta: {}
name: add_class
title: https://stackoverflow.com/questions/4124220/django-adding-css-classes-when-rendering-form-fields-in-a-template
- body: ''
library: rest_framework
meta: {}
name: format_value
title: ''
- body: ''
library: rest_framework
meta: {}
name: items
title: 'Simple filter to return the items of the dict. Useful when the dict may
have a key ''items'' which is resolved first in Django template dot-notation
lookup. See issue #4931
Also see: https://stackoverflow.com/questions/15416662/django-template-loop-over-dictionary-items-with-items-as-key'
- body: 'As per `items` filter above, allows accessing `document.data` when
Document contains Link keyed-at "data".
See issue #5395'
library: rest_framework
meta: {}
name: data
title: 'Simple filter to access `data` attribute of object,
specifically coreapi.Document.'
- body: ''
library: rest_framework
meta: {}
name: schema_links
title: Recursively find every link in a schema, even nested.
- body: ''
library: rest_framework
meta: {}
name: add_nested_class
title: ''
- body: ''
library: rest_framework
meta: {}
name: break_long_headers
title: 'Breaks headers longer than 160 characters (~page length)
when possible (are comma separated)'
- body: This only makes sense within a {% localtime off %} block.
library: tz
meta: {}
name: localtime
title: Convert a datetime to local time in the active time zone.
- body: ''
library: tz
meta: {}
name: utc
title: Convert a datetime to UTC.
- body: 'The argument must be an instance of a tzinfo subclass or a time zone name.
Naive datetimes are assumed to be in local time in the default time zone.'
library: tz
meta: {}
name: timezone
title: Convert a datetime to local time in a given time zone.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff