mdn / mdn/browser-compat-data

api.Report* - Resolve interface-to-dictionary ambiguity

Open
#27,354 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blocked data:api
Dominant language
JSON
Stars
5.8k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
186

Description

Some Reporting API interfaces were marked as deprecated in https://github.com/mdn/browser-compat-data/pull/27164, but this created ambiguity for consumers.

Normally, BCD doesn't cover dictionaries, so CSPViolationReportBody shouldn't be in BCD. But what if an interface became a dictionary?

BCD should resolve the ambiguity by either:

  • Keep the data as interfaces that are either non-standard or deprecated (or both?). This would need to be made explicit with a change in description or notes, to disambiguate from the dictionaries. It would also mean cascading deprecated/non-standard to the properties of the interface.
  • Remove the interfaces from BCD (treating them as if they were always dictionaries).
    This would mean that methods like toJSON() wouldn't be recorded in BCD, even though they exist.

Both options are a bit confusing. I don't care which one happens, but it would be nice to make an intentional choice here and document it.

Read https://github.com/mdn/browser-compat-data/pull/27164 for further discussion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the discussion in pull request 27164 and the existing api.Report* data in the repository. Decide whether these entries remain interfaces or are removed as dictionaries, then document that policy and update the affected data consistently, including the treatment of properties and methods such as toJSON().

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.