Skip to content

Commit

Permalink
Mi 5/qr code customization options (#487)
Browse files Browse the repository at this point in the history
* MI-5: Update docs with QR code customizations

* bump version

* Correct data types for positional parameters on qr_code

* Update shared/models/qr_code.yml

Co-authored-by: Juan Andres Friss de Kereki <[email protected]>

---------

Co-authored-by: Juan Andres Friss de Kereki <[email protected]>
  • Loading branch information
kevinpjones and juanfriss authored May 21, 2024
1 parent 1bb728d commit cd4ece1
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions shared/models/qr_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,52 @@ properties:
description: Sets how a QR code is being positioned in the document. Together with this, you should provide one of 'top' or 'bottom', and one of 'left' or 'right'.

top:
type: string
type: number
description: Vertical distance (in inches) to place QR code from the top. Only allowed if "bottom" isn't provided.

right:
type: string
type: number
description: Horizontal distance (in inches) to place QR code from the right. Only allowed if "left" isn't provided.

left:
type: string
type: number
description: Horizontal distance (in inches) to place QR code from the left. Only allowed if "right" isn't provided.

bottom:
type: string
type: number
description: Vertical distance (in inches) to place QR code from the bottom. Only allowed if "top" isn't provided.

redirect_url:
type: string
description: The url to redirect the user when a QR code is scanned. The url must start with `https://`

width:
type: string
type: number
description: The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square.

pages:
type: string
description: Specify the pages where the QR code should be stamped in a comma separated format. Your QR code can be printed in the same position on multiple pages. For postcards, the values should either be "front", "back" (for either front or back) or "front,back" (for the QR code to be printed on both sides). For self-mailers, the values should either be "inside", "outside" (for either inside or outside) or "inside,outside" (for the QR code to be printed on both sides). For letters, the values can be specific page numbers ("1", "3"), page number ranges such as "1-3", or a comma separated combination of both ("1,3,5-7").

logo:
type: object
description: Allows specifying a logo to be placed over the center of the QR code. Logos must be in PNG or JPEG format and have a maximum file size of 1 MB.
properties:
url:
type: string
description: The public URL of the logo image to be retrieved and placed over the center of the QR code.
pattern: "^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpe?g)$"

style:
type: object
description: Customizes the appearance of the QR code.
properties:
background_color:
type: string
description: The background color of the QR code in hexadecimal format. For example, `#000000` is black and `#FFFFFF` is white.
pattern: "^#[A-Fa-f0-9]{6}$"

foreground_color:
type: string
description: The foreground color of the QR code in hexadecimal format. For example, `#000000` is black and `#FFFFFF` is white.
pattern: "^#[A-Fa-f0-9]{6}$"

0 comments on commit cd4ece1

Please sign in to comment.