Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify and fix the descriptions of parsedSections for JS API #131

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

hrlyg
Copy link

@hrlyg hrlyg commented Nov 5, 2024

Summary of the changes:

  • In the CMP API specification doc,

    • Clarified PingReturn.parsedSections should be consistent with the GPP string.
    • Clarified the structure of PingReturn.parsedSections and added an example.
    • Explained what JS data types should be used, by pointing to this table.
    • Fixed JS data types and field names in the examples:
      • The corresponding JS data type of a Datetime field is Date, so the examples should use Date not string. Please note that in JS, new Date(...) produces a Date object, and a mere Date(...) produces a string.
      • GPPExtension: IAB Canada TCF.md has SubsectionType, not subsectionType, so the example should use the former spelling.
    • Made the PingReturn description more readable, by adding line breaks to comments that are too long.
  • In each individual spec,

    • Clarified the JS representation's field names and JS data types, and provided a link to the example of PingReturn.parsedSections.
    • Did not provide example of JS representation in each individual spec to avoid inconsistencies/mistakes in future specs. The example of PingReturn.parsedSections should be the one source of truth.

Core/CMP API Specification.md Outdated Show resolved Hide resolved
Core/CMP API Specification.md Outdated Show resolved Hide resolved
@patmmccann
Copy link
Contributor

Thanks for incorporating my suggestions!
LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants