Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lovemycodesnippets/6f79757a5fa5f067f7a1d107df198978 to your computer and use it in GitHub Desktop.
Save lovemycodesnippets/6f79757a5fa5f067f7a1d107df198978 to your computer and use it in GitHub Desktop.
Example: OpenAPI Overlay adds a license to an OpenAPI description:
overlay: 1.0.0
info:
title: Add MIT license
version: 1.0.0
actions:
- target: '$.info'
update:
license:
name: MIT
url: https://opensource.org/licenses/MIT
@DavidBiesack
Copy link

The overlay gist TAB characters which mess with the YAML indentation. I believe this should be:

overlay: 1.0.0
info:
  title: Add MIT license
  version: 1.0.0
actions:
  - target: '$.info'
    update:
      license:
      name: MIT
      url: https://opensource.org/licenses/MIT

I also suggest renaming the gist, i.e. as license.overlay.yaml but that would affect the article. I'm not sure if updating the gist on itHub will result in a corrected version on The New Stack or if the article needs a fix as well.

@lovemycodesnippets
Copy link
Author

Thank you. I've show this to the author of that post, we'll see if changes need to be made.

@DavidBiesack
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment