context7 icon indicating copy to clipboard operation
context7 copied to clipboard

Library Report: /websites/lua-api_factorio_stable - Missing or incorrect documentation. Possible parsing issue in Context7 Factorio snippets: get_contents() example shape is inconsistent with 2.0.x

Open Nikitendo opened this issue 9 months ago • 1 comments

Context7: https://context7.com/websites/lua-api_factorio_stable

Reason: Missing or incorrect documentation.

Description: Hi! This looks like a parsing/transformation issue in Context7 snippets for Factorio stable (/websites/lua-api_factorio_stable).

For LuaTransportLine.get_contents(), query-docs returned this example:

{
  "iron-plate": {
    "count": 100,
    "quality_count": {}
  },
  "copper-plate": {
    "count": 50,
    "quality_count": {
      "1": 25,
      "2": 25
    }
  }
}

This looks like a dictionary keyed by item name, but in Factorio 2.0.x canonical type is:

  • ItemWithQualityCounts :: array[ItemWithQualityCount]
  • fields: name, quality, count

So this may be a snippet parsing/normalization bug in Context7 (not source docs intent).

Refs:

  • https://lua-api.factorio.com/stable/concepts/ItemWithQualityCounts.html
  • https://lua-api.factorio.com/stable/concepts/ItemWithQualityCount.html

Issues:

  • [ ] Missing README
  • [ ] Outdated API documentation
  • [ ] Broken links
  • [ ] Incomplete examples
  • [x] Other

Nikitendo avatar Feb 16 '26 14:02 Nikitendo

This seems to be fixed now after the last refresh

Image

enesgules avatar Apr 03 '26 15:04 enesgules