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

ci: script to validate embedded examples in the asyncapi.md file #1059

Merged

Commits on Jun 7, 2024

  1. chore: copy files from test branch

    Changes:
    
    - copied files from test branch: https://github.com/AnimeshKumar923/asyncapi-spec/tree/embedded-examples-jsonPath-test/scripts/validation
    
    - copied because merge conflict and older files in the previous branch
    - files required for validation of embedded examples
    - still a WIP, more modification and refinement will be made in future
    AnimeshKumar923 committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    915f808 View commit details
    Browse the repository at this point in the history
  2. Delete file

    mistakenly added this file
    AnimeshKumar923 authored Jun 7, 2024
    Configuration menu
    Copy the full SHA
    74e3080 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2024

  1. fix: add comment in asyncapi.md for validation

    Changes:
    
    - added comments in the file as suggested by Sergio here: asyncapi#957 (comment)
    - more comments to be adjusted according to the json format
    AnimeshKumar923 committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    0515628 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f64f32c View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. fix: update script to handle component object ex

    Changes:
    
    - modified the script so that it can handle component object example
    - the script as of now add the fields and sub-fields in the updated-doc
      so that the other references remain unaffected
    - the earlier version was removinga and adding the whole part of the
      document altogether which affected the references and dependencies in
      the entire document
    AnimeshKumar923 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    532c4c2 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2024

  1. fix: update comments in spec, update base doc

    Changes:
    
    - updated the spec file to correctly match the json format and for
      further parsing
    - updated the base document to support more of the examples
    - added missing json version for some of the examples
    AnimeshKumar923 committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    4529772 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Configuration menu
    Copy the full SHA
    293a172 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dd069b0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    544d999 View commit details
    Browse the repository at this point in the history
  4. chore: remove added JSON examples

    Changes:
    
    - removed the examples added through 4529772
    - applied suggestion from: asyncapi#1059 (comment)
    AnimeshKumar923 committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    a51107d View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

  1. Configuration menu
    Copy the full SHA
    34dd72a View commit details
    Browse the repository at this point in the history
  2. fix: update file, create new base doc

    Changes:
    
    - created new base doc removing additional fields under
      'securitySchemes'. This is because we have to individuallly validate
      each examples under the Security Scheme Object. The additional fields
      were giving error during validation of those examples.
    - changes the object's name from `test` to `name`.
    - updated the script according to the changed object's name
    AnimeshKumar923 committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    150f3f5 View commit details
    Browse the repository at this point in the history
  3. fix: update script, update base doc

    Changes:
    
    - update script to determine the base doc, whether the 'server scheme
      object' is present or not
    - updated both the base docs with more missing fields
    AnimeshKumar923 committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    9986715 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. fix: update script

    Changes:
    
    - modified script which now creates an array of extracted examples along
      with the metadatas of it
    AnimeshKumar923 committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    5806a60 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96871f5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    375070a View commit details
    Browse the repository at this point in the history
  4. fix: update script, update asyncapi.md

    Changes:
    
    - updated the script to make new documents for each examples
      in the asyncapi.md, and then store them into a new file for
      further vaidation process
    - remove an extra character in asyncapi.md
    AnimeshKumar923 committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    ef231f0 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2024

  1. Configuration menu
    Copy the full SHA
    9ad0cc8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d806c6 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2024

  1. Configuration menu
    Copy the full SHA
    f9b725e View commit details
    Browse the repository at this point in the history
  2. fix: add function to validate the files

    Changes:
    
    - function to validate files using asyncapi-parser
    - function to validate files using asyncapi-cli
    AnimeshKumar923 committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    754e50e View commit details
    Browse the repository at this point in the history
  3. fix: update script, asynchronous validation

    Changes:
    
    - made the creation, updation and deletion of file dynamic
    - made the functions asynchronous for faster execution
    AnimeshKumar923 committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    d78f639 View commit details
    Browse the repository at this point in the history
  4. chore: update asyncapi.md, improve comments

    Changes:
    
    - modified the comment due to error while processing the slash ('/')
      character in the code
    AnimeshKumar923 committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    6878498 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'embedded-examples-ci'

    Changes:
    
    - merging the changes which I was testing separately to not affect this
      current branch
    AnimeshKumar923 committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    8534ae3 View commit details
    Browse the repository at this point in the history
  6. chore: clear the clutter, rename files, move files

    Changes:
    
    - cleared out the unnecessary files
    - move files to appropriate location
    - rename files to be more meaningful
    AnimeshKumar923 committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    9c82ffa View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    46f32a5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    dc81343 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    71eebd5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e1c8798 View commit details
    Browse the repository at this point in the history
  11. fix: update base doc, update script, update spec

    Changes:
    
    - updated base doc to support more examples
    - update script to handle arrays, and cleared the clutter
    - fixed incorrect comment in the spec file
    - adding updated files temporarily for debugging purpose
    AnimeshKumar923 committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    6f18cbc View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9e160c1 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. Configuration menu
    Copy the full SHA
    9d83edf View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. Configuration menu
    Copy the full SHA
    ac4443f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ced626f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ed55789 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4bb29e0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b8174d8 View commit details
    Browse the repository at this point in the history
  6. fix: put comments in proper place

    Changes:
    - similar change to: asyncapi#1059 (comment)
    AnimeshKumar923 committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    10ad1ed View commit details
    Browse the repository at this point in the history
  7. fix: update script, remove cli validation

    Changes:
    - removed cli validation
    - improved regex expression
    - improved extraction process
    - added `process.exit(1) at appropriate location, commented out for now,
      will be included in the final version
    - applied suggestions from: asyncapi#1059 (comment)
    AnimeshKumar923 committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    d7eb944 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    53290ea View commit details
    Browse the repository at this point in the history
  9. fix: modify script to support YAML versions

    Changes:
    - modified script to parse and validate YAML versions of the examples
    - update package.json and package-lock.json with new dependencies
    AnimeshKumar923 committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    cf62169 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4cb0ea7 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    208afe0 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Configuration menu
    Copy the full SHA
    02cbeb2 View commit details
    Browse the repository at this point in the history
  2. fix: update script, make validation in-memory

    Changes:
    - make script to validate the scripts in the memory itself instead of
      writing it to disk
    - applied suggestion from: asyncapi#1059
    AnimeshKumar923 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    e2cc95a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    742a2a2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1b97ec1 View commit details
    Browse the repository at this point in the history
  5. fix: update script, update spec, json merge patch

    Changes:
    - update script to be suited for json-merge-patch,
    - suggested by Sergio via Slack DM
      more details about merge-patch here: https://datatracker.ietf.org/doc/html/rfc7396
    - update spec file with comments suited for json-merge-patch
    - update dependencies
    AnimeshKumar923 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    803a30d View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Configuration menu
    Copy the full SHA
    2bfc0c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e017f3b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cc79163 View commit details
    Browse the repository at this point in the history
  4. fix: update script

    Changes:
    - update script to match the json_pointer object
    - add check for the root doc
    AnimeshKumar923 committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    13d56c7 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. fix: add comments to support array objects

    Changes:
    - update json pointer in spec that support the arrays merge in the base doc
    - update json pointer to support root doc
    AnimeshKumar923 committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    f7fdf63 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa8b894 View commit details
    Browse the repository at this point in the history
  3. fix: add missing parameter and values in example

    Changes:
    - modify examples in Operation Object
    AnimeshKumar923 committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    3059384 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4ef63f7 View commit details
    Browse the repository at this point in the history
  5. fix: remove array handling code section

    Changes:
    - after removing the section the code was still working fine
    - for inserting examples inside an array we only need to add the `/0`
      trailing end in the json_pointer object where deemed necessary
    AnimeshKumar923 committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    3edc981 View commit details
    Browse the repository at this point in the history
  6. fix: change pointer type to URI Representation

    Changes:
    - change json pointer from String Reperesentation to
      URI Fragment Identifier Representation
    - more info here: https://datatracker.ietf.org/doc/html/rfc6901#section-6
    - suggested by Sergio for consistency
    AnimeshKumar923 committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    f9d057f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3928ef3 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. Configuration menu
    Copy the full SHA
    54fab4b View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. fix: delete temporary files

    Changes:
    - deleted temporary files which were added to see the changes happening
      when the files were being constructed
    - remove example markdown file which simulated the spec doc for testing
      purposes
    - applied suggestions from: asyncapi#1059 (comment)
    AnimeshKumar923 committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    f31ff2a View commit details
    Browse the repository at this point in the history
  2. fix: OAuth Flow Object example fix

    Changes:
    - modify example to match the correct format of the spec
    - add new sub-heading to denote what kind of OAuth Flow is
    - applied suggestion from: asyncapi#1059 (comment)
    AnimeshKumar923 committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    882a512 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0d36e7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e1b0e65 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. Configuration menu
    Copy the full SHA
    7ebc2b3 View commit details
    Browse the repository at this point in the history
  2. chore: update and add new files

    Changes:
    - preparing a combined docs as per suggestion: asyncapi#1059 (comment)
    - update script to match the new combined document
    - delete separate security scheme document
    AnimeshKumar923 committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    91e8478 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2 from AnimeshKumar923/spec-examples-fix

    This PR contains spec example fixes identified during the validation script's testing.
    AnimeshKumar923 authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    9347567 View commit details
    Browse the repository at this point in the history
  4. chore: add error report file

    Changes:
    - added a file to track down the issues encountered and their fixes
      in one place.
    - Taken from: https://github.com/AnimeshKumar923/test-repo/blob/4d1269490a3a12a7c3363ba9efa2527ac40aeb4d/embedded-examples-error-resolution.md
    AnimeshKumar923 committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    af9b533 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ca76882 View commit details
    Browse the repository at this point in the history
  6. fix: add more example fixes

    Changes:
    - add more missing example parameters which were identified during the
      testing of the script
    AnimeshKumar923 committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    4ad2444 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0534dae View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e3d6a78 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. fix: add user-create.avsc file, update reference

    Changes:
    - added external avro schema file: 'user-create.avsc'
    - change the reference in the spec to point to the location of the avsc
      file
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    f814d82 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e1b0be View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ba11484 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c60f9ba View commit details
    Browse the repository at this point in the history
  5. chore: test run for the workflow

    Changes:
    - add process.exit(1) at appropriate locations
    - workflow should fail
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    c8271ca View commit details
    Browse the repository at this point in the history
  6. chore: test run for workflow

    Changes:
    - workflow should be passed
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    b196b73 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8c0e78c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    aa1564f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3dcfe50 View commit details
    Browse the repository at this point in the history
  10. fix: make consistency with the quotes

    Changes:
    - trying to maintain the consistency of the single quotes
      and double quotes
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    c788faf View commit details
    Browse the repository at this point in the history
  11. chore: add missing heading

    Changes:
    - the heading was mistakenly deleted during the addition of comments in
      the spec file
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    b24f71d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b60d353 View commit details
    Browse the repository at this point in the history
  13. fix: update script

    Changes:
    - applied suggestion from: asyncapi#1059 (comment)
    - applied suggestion from: asyncapi#1059 (comment)
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    5c5d91a View commit details
    Browse the repository at this point in the history
  14. fix: modify yaml example

    Changes:
    - modify yaml example which was failing due to not properly formatted
      structure
    - update json pointer at one location
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    2c3c55b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    34e00e0 View commit details
    Browse the repository at this point in the history
  16. fix: revert back to JSON String representation

    Changes:
    - The json pointer library doesn't supports the URI representation,
      so to reduce the extra work this change was made
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    6faca8d View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    81b40a5 View commit details
    Browse the repository at this point in the history
  18. Update scripts/validation/embedded-examples-validation.js

    apply suggestion: asyncapi#1059 (comment)
    
    Co-authored-by: Sergio Moya <[email protected]>
    AnimeshKumar923 and smoya authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    fd16aef View commit details
    Browse the repository at this point in the history
  19. fix: modify script

    Changes:
    - adjust script according to suggestion: asyncapi#1059 (comment)
    AnimeshKumar923 committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    caf79b5 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    47c77f3 View commit details
    Browse the repository at this point in the history